Stop using JavaScript for that - Moving features from JS to CSS and HTML
summary
Shows concrete replacements for common JS patterns: use datalist for autosuggest, input type=color for system color picker (including eyedropper), and the new input type=checkbox switch or CSS-styled checkbox instead of custom toggle code; enable smooth fragment scroll with scroll-behavior:smooth plus scroll-margin and prefers-reduced-motion; replace sliders with CSS scroll-snap and position:sticky; build accordions with details/summary and modals with dialog.showModal + form method="dialog" and backdrop/top-layer; use container queries, :has(), field-sizing, select-list prototypes, and scroll-driven animations.
AI-written summary · about
chapters (9)
- 0:00The case for declarative web
- 4:31Custom switches and inputs
- 13:36Form and input helpers
- 15:34Scroll and navigation
- 21:27Scroll snap and UI layouts
- 25:10Accordions and details
- 27:58Dialogs and the top layer
- 32:52Modern CSS layout features
- 35:37Future web features
related talks
36mStop using JS for that: moving features from JS to CSS & HTML
34mDon't Use JS for That: Moving Features to CSS and HTML
30mStop using JS for that: Moving features to CSS and HTML
31m"Stop using JavaScript for that: moving features from JS to CSS and HTML"
38mI Can’t Believe It’s Not JavaScript
31mI Can't Believe It's Not JavaScript!
57mDo It With Style: Rethinking CSS
29mThe Best JavaScript is No JavaScript
