W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css-variables] status ?

From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
Date: Sat, 26 May 2012 00:26:49 +0400
To: Sylvain Galineau <sylvaing@microsoft.com>
Cc: Tab Atkins Jr. <jackalmage@gmail.com>,Daniel Glazman <daniel.glazman@disruptive-innovations.com>,"www-style@w3.org" <www-style@w3.org>
Message-Id: <4011337977609@web22d.yandex.ru>
Unfortunately, using preprocessors is not always possible. For example, on Windows/IIS platform with a custom CGI executable without ability to use any script language, it's completely not an option. Also, using preprocessor does not provide ability to make CSS more compact (using Gzip not always possible, and is problematic under IIS6 and lower in particular).

Moreover, there is nothing _bad_ in having preprocessor features available natively. Using preprocessor for feature that can be easily and reasonably implemented natively would be unneeded overhead.

25.05.2012, 23:34, "Sylvain Galineau" <sylvaing@microsoft.com>:
> [Tab Atkins Jr.:]
>> šOn Fri, May 25, 2012 at 11:16 AM, Marat Tanalin | tanalin.com
>> š<mtanalin@yandex.ru> wrote:
>>> šIt's a shame. Actually _each_ property could be shortened, especially
>> šnon-shorthand ones, e.g.:
>>> šš šbackground-position => $bp
>>> šš šfont-family => $ff
>>> šš šline-height => $lh
>>> šš šword-wrap š => $wr
>>> šWhy not just expand CSS variables to use them anywhere?
>>> šOr at least not just in property values, but in property names too?
>>> šWhat are exact issues with it (if any)?
>>> šWhy hardly limit the feature (variables in this case) immediately as
>> šfast as it's invented?
>> šShortening CSS property names isn't a strong use-case. šNames are usually
>> šalready as short as possible while still being understandable.
>> ššShortening them further just makes them harder for others to read.
>> šMore importantly, one of the big reasons the CSSWG finally accepted
>> šVariables is because it offers powers that you *cannot do* with a
>> špreprocessor. šRewriting property names can totally be done in a
>> špreprocessor. šYou actually *want* the limitations that a preprocessor
>> šprovides here - you *really* don't want a variable you're using for a
>> šproperty name to change based on the element's position in the tree.
>> šThat's just confusing as hell.
> Defining one's own custom shorthands for property names is definitely
> a pre-processing use-case; and if minifying names during coding is a
> priority then I suspect you wouldn't want to stop there e.g. you'd want
> to do this in your JS code as well.
Received on Friday, 25 May 2012 20:27:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:16 UTC