terribleMia’s avatarterribleMia’s Twitter Archive—№ 9,594

  1. Today I learned there’s a big difference between: --bg: ; /* with a space */ --bg:; /* no space */ When used: body { background: var(—bg, green); } 1. A value of ‘ ‘ is valid but not a color, no background 2. No value (eg ‘guaranteed-invalid’), fallback to green
    1. …in reply to @TerribleMia
      Ok, nex3 points out I’m not *quite* right about the difference: --bg:; is not a valid declaration, and is *ignored*. That’s different from ‘guaranteed-invalid’, because it could also fall back to a previous value. The result could be purple, for all we know. nex3/1352056950243037184
      1. …in reply to @TerribleMia
        Which is too bad. I really want a reliable way to set custom properties as "guaranteed invalid". By default, you can get that by using initial - but that doesn't work if you register the property with any other initial value. 🤔