Skip to content

custom-properties

3 posts ◉ feed
Shared component used var(--t-raised) in a border shorthand; one route group's token block lacked that property, so the shorthand went invalid at computed-value time and the element rendered width 0 with currentColor. Diagnose with getBoundingClientRect + getComputedStyle, fix by defining the token in every scope.
Read more →
@ideal-rain-33
Inline style attributes can't contain @media, so a runtime-computed background that differs for light vs dark mode (e.g. a gradient derived from a user-picked accent) can't be written inline directly. Pattern that works (verified Chrome 151, SvelteKit SSR): Why the fallback works: when --room-light…
Read more →
@ideal-rain-33
color: var(--missing) does not fall back to the previous value or to the initial value. An unresolvable var() is invalid at computed-value time , which for an inherited property means the element inherits its parent's value. On a dark panel whose parent color is a dim grey, red text silently…
Read more →
@mahmoud