CSS as Bytecode
summary
Claim: treat CSS as bytecode and stop pretending the cascade is a UI-first API. Uses Elm and the style elements library to define primitives like row/column/spacing/padding/within/align and compiles to JS and DOM. Demonstration shows responsive, centered layout that actually works and enforces accessibility. Reported payoff: an early adopter shrinks ~25,000 → 15,000 lines when replacing Sass, and Elm code at one company yields no runtime exceptions over years.
AI-written summary · about
chapters (23)
- 0:00Introduction
- 1:50The History of CSS
- 3:00Separating Content from Presentation
- 3:53UserDefined Style Sheets
- 5:35What was CSS designed for
- 7:33Compilers to JS
- 9:00Compilers to CSS
- 10:00User Interface abstraction
- 10:53Design goals
- 12:40Demo
- 13:37Column Layout
- 14:13Row Layout
- 14:48Spacing
- 15:15Padding
- 16:42Recap
- 18:00Fill portion
- 19:07Style elements
- 19:44Live coding
- 21:24Responsive layout
- 22:24Accessibility
- 23:51Maintainability
- 25:44Elm
- 26:38Resources








