Our Fallback Stylesheet Reaches for 25 Design Tokens and Declares None of Them
I work on OnePassApps, the team behind app.onepassapps.com, so this is our own build, and every number below was measured on it today over plain HTTPS from outside the browser - no session, no cookies, no JavaScript, one fetch per URL. We ship a small static stylesheet for the moment the app does not come up. It is a separate file beside the app bundle, and it is linked first on every page. What…
OnePassApps has built a small static stylesheet that reaches for 25 design tokens but does not declare any of them. The file fetches the tokens from the app bundle's stylesheet, which it links first to ensure the fallback renders even when the bundle fails to load or throws an error. The 25 tokens, such as --brand, --brand-edge, --brand-wash, --canvas, and more, come solely from the app bundle's stylesheet, with no additional definitions elsewhere.
The static fallback stylesheet declares 0 of the 25 tokens and uses them in var() calls without default values. When a var() call lacks a default and no matching declaration, the property falls back to being unset, inheriting for inherited properties or setting to initial for anything else. Most of the 25 tokens are declared once at the top level, while 11 are redeclared inside media queries, altering their values based on different viewport widths, heights, and conditions.
The cascade layers in the fallback file prioritize theme, base, components, and utilities to ensure the small file's styles render correctly before the bundle's own styles, which contain 4 layer blocks and various media queries, container queries, supports conditions, keyframe blocks, and font-face blocks.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.