Re:Show HN: A completely different way to write responsive, ...
by tobr on Saturday July 18, 2020 @07:38AM
(#23880706)
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?
[ Parent
| on HN ]
Re:Show HN: A completely different way to write responsive, ...
by uxamanda on Wednesday July 22, 2020 @07:04PM
(#23922519)
The 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
[1] https://www.w3.org/TR/css-variables-1/#invalid-variables
Re:Show HN: A completely different way to write responsive, ...
by uxamanda on Wednesday July 22, 2020 @06:58PM
(#23922475)
I was playing around with this here: 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?