~/talk

Writing Modular Stylesheets with CSS Modules

Talkat ScotlandCSS 2016 · on Wednesday, 2016-06-01· [web-platform, component-design]
slides:none on file

Explains how CSS Modules makes selectors local by default and adds a unique hash per class derived from the class name and file path so identical class names never collide, shows output as a JSON map for server templates and demos using PostCSS and webpack and a simple PHP example, demonstrates composing styles from other modules to reuse a shared rule, and describes using the global keyword for true global selectors while claiming fewer specificity bugs and easier component-level reuse.

AI-written summary · about

  1. 0:00Introduction
  2. 1:06Why CSS Modules
  3. 3:13How CSS Modules work
  4. 8:49Live demo with PostCSS
  5. 12:21Quirks and limitations
  6. 13:23Benefits of modular CSS
  7. 15:53Key takeaways and conclusion
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.