bi-08 — Broader Ideas
Explicit inputs make caching possible
Layout's architecture — immutable inputs, immutable outputs, results keyed on inputs — is the same
move as pure functions plus memoisation, and the same move as immutable state plus reference
equality (fw-01).
The generalisation: you cannot cache what can change underneath you, and you cannot key a cache on inputs you have not enumerated. Every incomplete-key bug in this curriculum has the same signature: stale output, no error.
Internationalisation is an architecture decision, not a feature
Layout speaks logically (inline/block, start/end) all the way through the core, because
retrofitting RTL and vertical writing modes into a physically-expressed engine is not possible.
When your product says "we might need RTL later," this is the size of later. The cheap version of
the lesson: use logical CSS properties now (margin-inline-start, not margin-left). It costs
nothing today and is the difference between a week and a quarter when the requirement arrives.
Cycle-breaking by rule
"A percentage height against an auto-height containing block resolves to auto" is the answer to the
most-asked CSS question, and it is a cycle-breaking rule rather than an arbitrary one. Container
queries break their cycle with containment. ResizeObserver bounds its loop.
Three different resolutions to circular dependency, in one platform: restrict the input, restrict the dependency, or bound the iteration. Worth having all three in mind when you design a system where A depends on B depends on A.
Next
bi-09 shows what layout hands to paint and which changes skip layout entirely. fw-10 makes you
implement scroll anchoring by hand, which is the fastest way to appreciate that the browser does it
for you.