Vladimir Carrer在Hacker News上展示了Sumi.css,一个极简的、无类优先设计的CSS框架。1该框架以单文件形式提供,压缩后仅6.7KB,无需JavaScript依赖和构建步骤,开箱即可为语义化HTML元素直接应用样式。1
框架的设计强调易用性和可定制性。所有设计决策均通过CSS自定义属性(--s-前缀)实现,元素样式采用:where()选择器包装以实现零特异性,便于用户覆盖和定制。1Sumi.css默认支持亮暗模式,并可自动跟随系统设置。1该项目采用MIT许可证发布,兼容Chrome 111+、Edge 111+、Firefox 121+和Safari 16.2+等现代浏览器。1
Vladimir Carrer has unveiled Sumi.css, a minimalist CSS framework designed to style semantic HTML elements without requiring classes, build tools, or JavaScript dependencies 1. The entire framework is delivered as a single file compressed to just 6.7 KB, making it immediately usable out of the box 1.
The framework prioritizes simplicity and customization through CSS custom properties prefixed with --s-, allowing developers to easily override default styles 1. All element styling is wrapped in :where() selectors, which provide zero specificity to ensure straightforward style overrides 1. Sumi.css includes built-in support for light and dark modes that automatically adapt to system preferences 1. The project is released under the MIT license and maintains compatibility with Chrome 111+, Edge 111+, Firefox 121+, and Safari 16.2+ 1.
评论
还没有评论,欢迎留下第一条。