W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: Enhancing grouping of selectors

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Thu, 24 Mar 2011 10:04:11 -0700
Message-ID: <AANLkTimNzJYQKJYcvsSFhwAoaLbe3knKtd=u30BiNHvv@mail.gmail.com>
To: Paul Duffin <pduffin@volantis.com>
Cc: www-style <www-style@w3.org>
On 9/17/10, Paul Duffin <pduffin@volantis.com> wrote:
> I am not sure whether this is the correct forum to propose enhancements to
> CSS, if not I apologize and just ask that you redirect me to the correct
> place.
> CSS selectors are very powerful but sometimes they can be quite verbose,
> especially when using combinators such as child and descendant which often
> involve a lot of repetition, e.g.
> .foo > .blah > a,
> .foo > .blah > a:hover,
> .foo > .blah > a:visited,
> .bar > .blah > a,
> .bar > .blah > a:hover,
> .bar > .blah > a:visited { /*properties*/ }
> The above are simplified versions of real selectors, and there is no way to
> simplify them without adding extra information (e.g. classes) into the
> markup being styled, whose only purpose would be to simplify the CSS.


> What do you think?
Odd to use "foo" and "blah" in real code.

Aside from that, it always seemed like a good idea to have a way to
get a "selectorGroup" from a CSSRule as something like a DOMTokenList.

.foo, .bar {



But DOMTokenList says the delimiter is one or more space characters
(not comma). Actually the whole API for traversing stylesheets is bad.
Needs a whole new API.
Received on Thursday, 24 March 2011 17:04:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:44 UTC