项目
在 GitHub 查看 modular-css
tivac/modular-css
关于
更完善的 CSS Modules,可通过 Rollup、Vite、Webpack、CLI、PostCSS 或 JS API 使用
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文modular-css

A streamlined re-interpretation of CSS Modules
Documentation
Check out the official modular-css site: http://m-css.com/
Try it
There's an online REPL where you can try out modular-css without needing to install anything!
Features
Composition
.red {
color: red;
}
.blue {
composes: red;
background: blue;
}
/* in the output .blue will be combination of both styles */
Values
@value alert: #F00;
.alert {
color: alert;
}
/* will output as */
.alert {
color: #F00;
}
Selector Scoping
.style {
color: red;
}
:global(.style2) {
color: blue;
}
/* Will output as */
/* Scoped with unique file-based prefix */
.f5507abd_style {
color: red;
}
/* Remains unstyled due to :global() pseudo */
.style2 {
color: blue;
}
Style Overrides
/* input.css */
.input {
width: 100%;
}
/* fieldset.css */
.fieldset :external(input from "./input.css") {
width: 50%;
}
More detailed descriptions are available on the website.
Install
Detailed installation instructions are available on m-css.com
探索相关项目
加载中…