Skip to content

css-modules/postcss-modules-local-by-default

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7942f72 · May 19, 2023
May 18, 2023
May 18, 2023
May 18, 2023
May 11, 2015
Oct 11, 2020
Sep 16, 2020
May 19, 2023
May 11, 2015
Sep 22, 2020
Sep 22, 2020
Sep 22, 2020
May 19, 2023
May 18, 2023

Repository files navigation

Build Status codecov npm

CSS Modules: Local by Default

Transformation examples:

.foo { ... } /* => */ :local(.foo) { ... }

.foo .bar { ... } /* => */ :local(.foo) :local(.bar) { ... }

/* Shorthand global selector */

:global .foo .bar { ... } /* => */ .foo .bar { ... }

.foo :global .bar { ... } /* => */ :local(.foo) .bar { ... }

/* Targeted global selector */

:global(.foo) .bar { ... } /* => */ .foo :local(.bar) { ... }

.foo:global(.bar) { ... } /* => */ :local(.foo).bar { ... }

.foo :global(.bar) .baz { ... } /* => */ :local(.foo) .bar :local(.baz) { ... }

.foo:global(.bar) .baz { ... } /* => */ :local(.foo).bar :local(.baz) { ... }

Building

$ npm install
$ npm test
  • Build: Build Status
  • Lines: coveralls
  • Statements: codecov

Development

$ yarn test:watch

License

MIT

With thanks


Mark Dalgleish, 2015.