3 ms·
Can I ask, what’s the reason for using the keyword “initial”? As I understand it it could be any string that doesn’t accidentally create a valid value?
by tobr 6y ago
Can I ask, what’s the reason for using the keyword “initial”? As I understand it it could be any string that doesn’t accidentally create a valid value?
- uxamanda 6y agoI was playing around with this here: https://jsbin.com/zebipenidi/1/edit https://jsbin.com/zebipenidi/1/edit and tried editing the keyword to other things. When I tried other strings (my name, "null", other CSS "words" like opacity) it broke. I wonder if this is because the initial variable definition needs to be valid css in order to be replaced?
- uxamanda 6y agoThe OP tweet this about it [0], which links to the CSS spec [1]. It seems like a variable defined as initial triggers a different behavior than a traditional "syntax" error. [0] https://twitter.com/James0x57/status/1283909866915074048 https://twitter.com/James0x57/status/1283909866915074048 [1] https://www.w3.org/TR/css-variables-1/#invalid-variables https://www.w3.org/TR/css-variables-1/#invalid-variables