The Design Evolution of elm-css and elm-test
summary
Shows a type-safe CSS DSL that compiles to real styles, trade-offs around syntax, units and namespacing, and the extensible record trick used so properties like Auto compile only where legal; elm-css ships, is used in production, and sacrifices some error clarity for CSS familiarity. Describes elm-test 2.0: integrated fuzz tests that run 100 iterations with shrinking via elm-pcg and Rose trees, deterministic runs via seed distribution so failures reproduce and later support parallelization, incremental failure traces, view testing, and safer test filtering.
AI-written summary · about
chapters (33)
- 0:00The problem with CSS
- 2:13Designing the Elm CSS library
- 4:27First draft and DSL
- 7:12Pre-processor and demo
- 9:10Syntax and tooling concerns
- 11:31Balancing familiar vs functional
- 13:02Revised DSL and unit types
- 14:35Addressing namespace collisions
- 16:50Namespacing and combinators
- 19:12The 'compatible' type hack
- 23:45Concessions for usability
- 25:18Tension in API design
- 27:45Community contributions
- 29:46Long-term goals for Elm CSS
- 31:46The state of Elm Test 1.0
- 33:38Fuzz testing in Elm
- 35:41Taking over Elm Test
- 37:32Design philosophy for testing
- 39:05Implementing fuzz testing
- 42:22Domain knowledge and shrinking
- 45:31Fuzz test output design
- 46:55Designing for future needs
- 49:09Seed distribution logic
- 50:52Composable fuzzers
- 53:04The role of 'andThen'
- 54:11Premature optimization
- 56:00Testing HTML views
- 58:25Incremental feedback
- 1:00:01Testing user interactions
- 1:01:38Filtering and safety
- 1:04:27Running specific files
- 1:07:49Future testing goals
- 1:10:26Summary of lessons
