Re: [CSSWG] Minutes and Resolutions F2F Kyoto Sat: CSS3 Fonts, Regions, @viewport, Variables, @supports, Selectors4, Administrivia

On Fri, Jun 10, 2011 at 11:03 AM, Daniel Glazman
<> wrote:
> Le 10/06/11 18:39, fantasai a écrit :
>> Selectors Level 4
>> -----------------
>> fantasai presented the idea of a new level of Selectors. The current
>> draft excludes pseudo-elements (which would be a separate module) and
>> adds
>> - :matches() and :not() that take a comma-separated list of selectors
>> - :dir(ltr) and :dir(rtl) that match against the markup-determined
>> directionality
>> - the ability to choose which component of a selector represents its
>> subject
> OMG !!! I implemented the last one back in 1996 in my STTS processor...
> Finally. Please not that if we have that (I implemented it in two
> flavors: :subject and a ! descriptor), I'm not sure we need :matches().

:matches() does something completely different than the subject
selector.  They can't be compared in functionality.  :matches() just
lets you collapse places where you have to repeat a selector several
times because of small possible variations.

For example, every UA stylesheet has a silly explosion of selectors
for setting the proper bullet on lists based on the nesting depth,
since there are four elements that qualify as "lists".  With matches,
you can simplify that considerably.  Here's the selector for the third
nesting level of unordered lists, taken from HTML:

dir dir dl, dir dir menu, dir dir ul,
dir menu dl, dir menu menu, dir menu ul,
dir ol dl, dir ol menu, dir ol ul,
dir ul dl, dir ul menu, dir ul ul,
menu dir dl, menu dir menu, menu dir ul,
menu menu dl, menu menu menu, menu menu ul,
menu ol dl, menu ol menu, menu ol ul,
menu ul dl, menu ul menu, menu ul ul,
ol dir dl, ol dir menu, ol dir ul,
ol menu dl, ol menu menu, ol menu ul,
ol ol dl, ol ol menu, ol ol ul,
ol ul dl, ol ul menu, ol ul ul,
ul dir dl, ul dir menu, ul dir ul,
ul menu dl, ul menu menu, ul menu ul,
ul ol dl, ul ol menu, ul ol ul,
ul ul dl, ul ul menu, ul ul ul {
  list-style-type: square;

Here's the same thing using :matches():

:matches(dir, menu, ol, ul) :matches(dir, menu, ol, ul) :matches(dl, menu, ul) {
  list-style-type: square;


Received on Friday, 10 June 2011 18:18:03 UTC