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

RE: [css-variables] status ?

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Fri, 25 May 2012 19:34:07 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
CC: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F0178290A357264@TK5EX14MBXC262.redmond.corp.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 19:34:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT