[css-variables] Reopening the casing issue


Everybody will hate me, maybe, but I just wanted to reopen for an instant the case of [css-variables] case sensitivity, maybe not the change the outcome but at least to present an issue I just faced where this was a very annoying problem: I used a CSS compressor.

CSS compressors optimize CSS files by removing white space, but also by sorting properties and making the casing uniform. That way, encoder like DEFLATE can make more use of previous parts of the file to avoid data duplication. My issue was that when I write 

  selector { var-X: something; }

most CSS compressors modify it into


which caused it not to work somewhere else where I didn't use the compressor. The issue was not so obvious to spot, because X is not that different in upper and lowercase (but, to be honest, it was just a test, not sure if I would use 'X' as a custom property name for real).

I can live with the option that only lower-cased variables should be used and are garanteed to be preprocessor-safe, but if I'm about to accept this limitation, the possibilities opened by differential casing become much lower. Wouldn't it be better to say that ASCII-case folding is done on the identifiers? That should cover the most common casing issues (I really hardly saw any identifier with non-ASCII letters on the web anyway).


Received on Tuesday, 11 June 2013 11:38:56 UTC