Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

A streamlined re-interpretation ofCSS Modules

Documentation

Check out the official modular-css site:http://m-css.com/

Try it

There's an online REPL where you can try outmodular-css without needing to install anything!

http://m-css.com/repl

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(inputfrom"./input.css") {width:50%;}

More detailed descriptions are available onthe website.

Install

Detailed installation instructions are available on m-css.com

https://m-css.com/overview/#introduction-how

About

CSS Modules, but better and usable via Rollup, Vite, Webpack, CLI, PostCSS, or JS API

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors22


[8]ページ先頭

©2009-2025 Movatter.jp