W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: Supporting Scoped Selectors in Selectors API 2

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Wed, 30 Sep 2009 09:44:21 +0200
Message-ID: <4AC30C55.10904@disruptive-innovations.com>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Cc: www-style <www-style@w3.org>
FWIW I have always thought that we are underusing an existing selector
that could be very useful for scoped stylesheets: the :root pseudo.
It currently matches the root of the document but I don't think it
makes a lot of sense in the case of a scoped stylesheet anyway.
I mentioned it multiple times in the past.

Furthermore, it's currently hard to refer to the root of a subtree
a scoped stylesheet applies to if that root element is an arbitrary
element with no specific or known class, id or type the author can
refer to. Hence :reference.

 From my own perspective - my co-chairman hat off - I'd love to this
the definition of :root changed to match the root of the tree or
subtree the stylesheet applies to.

That would solve Lachlan's problem and clarify a few other isssues
with scoped stylesheets. It would also make :root more visible because
it's pretty unused for the time being.

In any case, I find ! ugly and confusing. I also find selectors starting
with a combinator as proposed by Lachlan a really bad solution.

</Daniel>
Received on Wednesday, 30 September 2009 07:44:51 GMT

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