-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Josh Johnston edited this page Oct 23, 2017
·
1 revision
CSS Modules makes it easy to work with CSS classes that are:
- immutable: once we define a class its meaning should not change (ie. avoid cascading)
- composeable: compose single-purpose classes together (rather than overriding properties via cascading)
- meaningful: classes should be small and single-purpose, but not so small that their purpose becomes unclear.
cmz
differs from other CSS Modules implementations in the following areas:
- Faster to install & build.
- Runs in node & the browser without any additional tools (but we can use a babel plugin to enhance & optimise).
- Doesn't overload
require
/import
for importing a CSS Module. We can do this with a normal js function call. - Doesn't introduce new CSS syntax for composition and values. We can do this in javascript.