Skip to content

dbertella/css-modules-talk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

css-modules-talk

Think different, think components

OOCSS, ACSS, BEM, SMACSS

CSS in JS

If you’re writing React, you have access to a more powerful styling construct than CSS class names. You have components.

CSS Modules

What they solve

  • Global Scope: CSS Modules eliminate collisions in the global scope, they handle BEM for you.
  • Overqualified Selectors: Because CSS modules live at the component level, there’s no need to write deeply nested selectors. Class names can be kept simple and relevant to the component.
  • Refactoring: Refactoring is made simple, because we’re working at the component level, we can easily determine which styles apply to the component. For styles that use composition, we can quickly locate the other affected components.

Are CSS Modules right for my project?
CSS Modules are not suitable for every project. A component based architecture is required (React, Angular 2), and aside from Rails, they only work with JavaScript applications. Furthermore, if you’re already using BEM, it may not make sense to switch to CSS Modules.

Atomic CSS Modules

Links

About

Think different, be local (by default)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published