Dynamic CSS secrets
summary
CSS custom properties move from simple tokens to reactive component APIs: two-thirds of variables are constants in the web Almanac but variables can drive hover animations, randomized accents, and a rainbow hue animation once declared with @property addProperty so the browser can interpolate numbers. Practical patterns include pseudo-private variables for bundled fallbacks, the space-toggle hack (whitespace + initial) to toggle complex styles, counter+integer tricks to render percentages, linear mapping for color/position interpolation, and an SVG eye demo driven purely by root-level vars.
AI-written summary · about
