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.