custom-properties for People Who Hate caching — Guides article on custom-properties

custom-properties for People Who Hate caching

An approach that trades a little power for a lot of clarity. Reflects two years of running this in production.

The documentation is accurate, which is not the same as being useful. It tells you what the function does. It does not tell you when reaching for it is a mistake, and that is the part you need.

Start with the smallest thing that could possibly work. Not because it is the final answer, but because it gives you something to measure against, and measuring is how you find out whether the clever version is worth it.

The trick is to make the correct thing the easy thing. If the path of least resistance produces good output, you do not need a linter, a style guide, or a code review rule to enforce it.