Writing CSS Algorithms
summary
Argues CSS is a domain-specific declarative programming language and defines a “CSS algorithm” as a well‑defined declaration set that produces specific styling; shows a Pattern Library with ~20 algorithms (examples: glue for positioning, space-children, clearfix, fluid type, grid) used across a WordPress project (one algorithm reused 15 times). Describes a workflow: sketch boxes, brute‑force in scratchpad.scss, refactor into shared algorithms, and a prototype for unit tests for CSS that inspects rendered boxes.
AI-written summary · about
