~/talk

Don't Use JS for That: Moving Features to CSS and HTML

Talkat JSConf Budapest 2024 · 2024-06-26..06-28· [css]
slides:none on file

Concrete demos show replacing JS with built-in primitives: styled toggles using checkbox checked and the new switch attribute (Safari), datalist and input[type=color] for suggestions and pickers, smooth scrolling via scroll-behavior with prefers-reduced-motion, details/summary accordions, and dialog using showModal/top layer/backdrop plus starting-style for animations. Also covered are container queries, field-sizing, the experimental select list, scroll-driven animations, and conditional logic via the :has selector. Accessibility tradeoffs and when small JS still helps are demonstrated.

AI-written summary · about

  1. 0:00Introduction
  2. 3:41Least power in web dev
  3. 5:28Custom switches without JS
  4. 16:00Smooth scrolling with CSS
  5. 21:38HTML accordions and dialogs
  6. 29:11Container queries and has selector
  7. 31:40Field sizing demos
  8. 33:29Scroll animations and conclusion
~/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.