CSS Modules: Scope Locals & Extend
Last updated
Last updated
Transforms:
into:
so it doesn't pollute CSS global scope and can be simply used in JS like so:
Since we're exporting class names, there's no reason to export only one. This can give us some really useful reuse of styles:
becomes:
Note: you can also use composes
as a shorthand for compose-with
You're looking for CSS Modules. It uses this plugin as well as a few others, and it's amazing.
npm autotest
will watch src
and test
for changes and run the tests, and transpile the ES6 to ES5 on success
ISC
Mark Dalgleish
Tobias Koppers
Guy Bedford
Glen Maddern, 2015.