Re: [css3-selectors] Grouping

Am 09.01.2010 11:36, schrieb François REMY:
> What you're speaking about now *IS NOT* the
> original meaning of :matches selector. It has been
> introduced in this mailing list for another purpose.
>
> p:matches(a:hover) was introducted to match any
> P tag that contains an element matching "a:hover"
> in it. The :has() syntax has been used too.
>
> The main reason why this pseudo-class was
> rejected by some implementors : it doesn't
> allow to apply changes only to sibling
> elements. Adding an element to the DOM could
> modify the style of parent elements, which is
> currently not possible (we can only modify
> sibling' element style, they said)
Yeah. If using grouping there shouldn't be any implementational problems.
> If we return to your current proposal (selector
> grouping), it was also discuted previously under
> many names. At a time, this was even discussed
> to be part of the "css variables" pack (BTW, I'm
> disapointed that no progress has been made on
> this feature many people would love to have).
>
> Many syntax had been proposed, but they were
> rejected since they didn't comply with CSS
> grammar or were too difficult for the author to
> use.
I think
.add (#publications, #authors) (input, select, textarea)
really is self explaining and not that hard to implement, is it?
>
> I think the best syntax ever, and that many
> server-side css parser does implement (like
> http://lesscss.org/) under the name "nested
> rules", would really be nice to have in CSS.
>
> Many syntax would be possible among theses one :
>
> --------------------------------------
>
> #myElement > div {
>    display: block;
>    width: 500px;
>
>    @rule > a {
>        display: block;
>        color: blue;
>    }
>
>    @rule > a:hover {
>        color: red;
>    }
> }
That's yet another feature and it quite is useful. It is an addition to 
grouping.
.add (#publications, #authors) (input, select, textarea)
is better to understand and has different use cases then
.add {
     @rule #publications, @rule #authors
     {
         @rule input, @rule select, @rule textarea
         {
             ...
         }
     }
}
>
> It would be great, though, to avoid using a
> single pseudo-class (:matches) to discut about
> two very different proposals, because it may
> conduce to confusion.
>
> Regards,
> François 

Received on Saturday, 9 January 2010 14:00:11 UTC