3 ms·
I observed this whitespace behaviour by accident maybe a year and a half ago (I think it was related to either CSS minification experiments or how Firefox’s dev
by chrismorgan 6y ago
I observed this whitespace behaviour by accident maybe a year and a half ago (I think it was related to either CSS minification experiments or how Firefox’s dev tools didn’t cope at all well with empty or only-whitespace property declarations), and after a bit of poking and prodding figured out how to achieve exactly what this article describes, poor man’s if(). Since then I’ve seen a couple of others discover and report this independently as well, and I’m sure plenty of others have found it too. It’s always fun when you have a complex system and people stumble upon interesting emergent behaviour. I doubt that the CSS Custom Property spec writers had this sort of application in mind when they specified that it was whitespace-sensitive.