One thing I’ve come to sad conclusion with is that you can’t really increment a CSS variable using just CSS. I tried incrementing a value on hover, and it didn’t work. It seems like you have to use JavaScript to permanently set a CSS variable to a new value. Using animation keyframes, for example, doesn’t change the variables in the right scope. At least that is what I seemed to find. I’d love to be proven wrong
CSS variables are something new to me and looks useful. Regarding “What’s old is new again” email, did CSS had variables before? I wasn’t aware of it.
Btw, @kirupa, your signature at the end of the tutorials is cool!
That is unfortunately correct, Reb! If you have to support IE, then the traditional string-based approach is what you will need to use. I should update that tutorial shortly to mention this as a note.
From what I’ve been tracking, IE is more dominant in enterprises who need access to some legacy tech that only IE works on. For consumers, the usage of IE is extremely low. Different metrics report different numbers, but the caniuse value of around 2.64% (which is from StatCounter) sounds more right than the 12% number that netmarketshare is reporting. StatCounter’s desktop browser share has IE at around 8%.
(Welcome to the forums, btw! )
Creating engaging and entertaining content for designers and developers since 1998.