The Algorithms of CSS
summary
Argues that CSS is a domain-specific declarative programming language, then maps spec to browser source (Servo/Blink) using searchfox.org and cs.chromium.org to read Rust and C++ that implement the cascade. Proposes an algorithmic workflow: plan inputs/outputs, write a brute‑force “spaghetti” CSS solution, test, then refactor into system‑friendly rules that use intrinsic algorithms like display:flex and Grid. Demonstrates it by building and optimizing a responsive “ocean boxes” layout that works and makes CSS authoring faster and more intentional.
AI-written summary · about
chapters (7)
- 0:00Start
- 2:56Is CSS a programming language?
- 3:58What is a programming language?
- 8:04CSS is a domain - Specific declarative programming language.
- 8:34Algorithms 101
- 12:15The Cascade!
- 24:43Conclusion!








