- From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
- Date: Wed, 06 Jun 2012 01:37:51 +0400
- To: Tab Atkins Jr. <jackalmage@gmail.com>
- Cc: François REMY <fremycompany_pub@yahoo.fr>, www-style list <www-style@w3.org>
05.06.2012, 04:58, "Tab Atkins Jr." <jackalmage@gmail.com>: > On Mon, Jun 4, 2012 at 5:01 PM, Marat Tanalin | tanalin.com <mtanalin@yandex.ru> wrote: >> 05.06.2012, 03:02, "Tab Atkins Jr." <jackalmage@gmail.com>: >>> On Mon, Jun 4, 2012 at 2:58 PM, Marat Tanalin | tanalin.com >>> <mtanalin@yandex.ru> wrote: >>>> I tend to consider repeating prefix (be it `my-` or any other) when using a variable somewhat redundant. >>> That redundancy often makes it easier to see relationships. >> How does the redundancy makes it easier than nonredundancy? > Consistency in syntax means your brain has to work less to parse and understand things at a glance. This is generally a good thing. It seems you are talking about prefixing variables during _defining_ (as in current CSS-variables spec draft) while my initial sentence was an objection to François's proposal to use prefix for _both_ defining (it's OK) and using/reading (it seems to be redundant) variable. I'm rather fine with using prefix for _defining_ (not reading) variable, I'm against using prefix for _both_ defining and _reading_. As far as I understand, you consider prefix on reading variable unneeded too (same as I do), so perhaps there is nothing for us to dispute as for this. >> For the rest, it may (or may not) make sense to consider using @variables at-rule inside regular rules: >> >> .example { >> @variables { >> link-color: red; >> } >> } >> >> .example A {color: $link-color; } > That would be a larger change to the Core Grammar, and is still unlikely to actually save any characters over a prefix. AFAICT, the "rule inside rule" change will be needed for CSS Hierarchies [1] anyway, so this should not be a problem. [1] http://dev.w3.org/csswg/css3-hierarchies/
Received on Tuesday, 5 June 2012 21:38:23 UTC