~/talk

Stop using JS for that: Moving features to CSS and HTML

Talkat XtremeJS 2024 · 2024-11-12..11-13· [web-platform, css]
slides:none on file

A practical tour of features that replace small chunks of JS with HTML and CSS: build a toggle from a native checkbox styled via appearance: none plus ::before and :checked, use scroll-behavior: smooth with prefers-reduced-motion and scroll-margin/scroll-padding for fixed headers, use details+summary and the open attribute for accordions, use dialog with showModal() (still one tiny JS call) and top-layer/backdrop styling, apply container queries, the :has() selector for conditional UI, and Chrome’s scroll‑driven animations and field-sizing to cut brittle JS.

AI-written summary · about

  1. 0:00Introduction
  2. 5:01Custom switches with HTML/CSS
  3. 11:22Smooth scrolling with CSS
  4. 16:02Native accordions and dialogs
  5. 21:49Dialog backdrop styling
  6. 23:17Container queries and has selector
  7. 25:10New CSS features
  8. 27:21Scroll-driven animations
  9. 28:26Why native features
~/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.