W3C home > Mailing lists > Public > www-style@w3.org > April 2015

Re: CSS Classes Custom - by Leonardo Lima

From: Brian Kardell <bkardell@gmail.com>
Date: Wed, 8 Apr 2015 16:39:47 -0400
Message-ID: <CADC=+jegKvCG9MGQkCATW_SdN0c6xNG2L_Hc7WeAtVP5onVCBg@mail.gmail.com>
To: François REMY <francois.remy.dev@outlook.com>
Cc: Andrea Rendine <master.skywalker.88@gmail.com>, Leonardo Lima <leonardo403@gmail.com>, www-style list <www-style@w3.org>
On Wed, Apr 8, 2015 at 4:25 PM, François REMY
<francois.remy.dev@outlook.com> wrote:
>>> Would this proposal solve your needs?
>>> http://tabatkins.github.io/specs/css-extend-rule/
>>
>> Actually this is what I was looking for, and I guess the original proposer can appreciate it too. I only have 2 issues:
>> [François's Note: reformatted]:
>>
>> 1. Extending any selector creates weird specificity battles as in "#ID { ... } .class { @extend #ID; ... }"
>> 2. Extended fake-selectors (%mixin) should inherit the specificity of the parent rule, not have their own.
>>
>> Could this be useful to improve CSS Extend Rule?
>
> Yes, those comments look interesting; I'm sure Tab Atkins will read them and see how the overall design can take this into consideration.
> Reading your comments, maybe extending any selector isn't the simplest option the CSSWG could pursue.
>

Tab talks about this in example 5 of that document, it does explain
how specificity works and it seems pretty decent to me - can you
explain why it seems problematic a little more fully?

-- 
Brian Kardell :: @briankardell :: hitchjs.com
Received on Wednesday, 8 April 2015 20:40:15 UTC

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