~/talk

Scope in CSS with and without JavaScript

Talkat MidCamp 2020 · 2020-03-19..03-21· [css, frontend-architecture]
links:none on file
slides:none on file

CSS is global by default but multiple concrete options let teams choose tradeoffs: using BEM or Sass partials gives BEM-like component conventions and needs discipline; atomic frameworks like Tailwind move styling into markup; CSS-in-JS (Styled Components) provides component scope by generating unique hashed class names at runtime and lets components change styles from props but adds bundle/runtime cost; Vue’s scoped attribute and CSS Modules scope styles at build time; a Gatsby + Drupal project shares Sass partials between builds and is working in practice.

AI-written summary · about

  1. 0:00Introduction
  2. 3:17CSS global scope explained
  3. 15:18CSS methodologies like BEM
  4. 21:34CSS in JS component scope
  5. 27:30Why can't we have both?
  6. 28:12Can regular CSS have scope?
  7. 32:08CSS modules approach
  8. 38:24Component-level separation
  9. 43:32Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.