W3C home > Mailing lists > Public > www-style@w3.org > June 2013

[css-variables] Reopening the casing issue

From: François REMY <francois.remy.dev@outlook.com>
Date: Tue, 11 Jun 2013 13:38:28 +0200
Message-ID: <DUB120-W453FE8DD3FD85E6B5DEA4A5850@phx.gbl>
To: "www-style@w3.org" <www-style@w3.org>
Hi,

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

  selector{var-x:something}

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).


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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC