-
Pushing CSS DRY switching further, I made "token-based" themes with defaults. Using great LeaVerou tips & setting @property's initial value, spaces are discarded & defaults are used! Caveats: no var() default, no custom idents/list (?). codepen.io/chriskirknielsen/pen/eYMgErO (Chromium only)
-
…in reply to @ckirknielsen
I could use logic operations with
0
and1
s if no themes are "on" for a value, but that approach falls apart for non-number values. This is tough! -
…in reply to @ckirknielsen
With a little repetition, providing the default value as a theme's set value if not provided works, but yeah… repetition, dang. codepen.io/chriskirknielsen/pen/JjLEZeL