ckirknielsen’s avatarckirknielsen’s Twitter Archive—№ 1,339

      1. 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)
        OpenGraph image for codepen.io/chriskirknielsen/pen/eYMgErO
    1. …in reply to @ckirknielsen
      I could use logic operations with 0 and 1s if no themes are "on" for a value, but that approach falls apart for non-number values. This is tough!
  1. …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
    OpenGraph image for codepen.io/chriskirknielsen/pen/JjLEZeL