— TIL
Today I Learnt
-
Cascade layers don't affect specificity between layers
When you define @layer, the layer order determines priority — not specificity. A low-specificity rule in a later layer beats a high-specificity rule in an earlier one. Elegant once it clicks, deeply confusing until it does.
-
git restore is the modern way to discard changes
git checkout for discarding working directory changes has been superseded by git restore. Less ambiguous — checkout does too many different things depending on context. git restore --staged to unstage, git restore to discard.
-
Directory data files merge, not override
If a file in a directory has tags in its own frontmatter and the directory data file also sets tags, Eleventy merges them — it doesn't pick one or the other. Bit of a gotcha when trying to move content between collections.