- Notifications
You must be signed in to change notification settings - Fork19
CSS Modules, but better and usable via Rollup, Vite, Webpack, CLI, PostCSS, or JS API
License
NotificationsYou must be signed in to change notification settings
tivac/modular-css
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A streamlined re-interpretation ofCSS Modules
Check out the official modular-css site:http://m-css.com/
There's an online REPL where you can try outmodular-css without needing to install anything!
.red {color: red;}.blue {composes: red;background: blue;}/* in the output .blue will be combination of both styles */
@value alert:#F00;.alert {color: alert;}/* will output as */.alert {color:#F00;}
.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;}
/* input.css */.input {width:100%;}/* fieldset.css */.fieldset:external(inputfrom"./input.css") {width:50%;}
More detailed descriptions are available onthe website.
Detailed installation instructions are available on m-css.com
About
CSS Modules, but better and usable via Rollup, Vite, Webpack, CLI, PostCSS, or JS API
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.