W3C home > Mailing lists > Public > www-style@w3.org > January 2000

:matched() proposal (Was: target-attr() and /reference combinator/ proposals)

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Fri, 28 Jan 2000 01:02:16 +0000 (GMT)
To: Sjoerd Visscher <sjoerd@heeten.nl>
cc: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.10001280026450.19894-100000@mary.bath.ac.uk>

On Tue, 25 Jan 2000, Sjoerd Visscher wrote:
> Scoping is not very CSS like, and unclear.

Agreed.


> But I think :matched is not a good idea. Instead I'd like to propose
> a 'this' indicator inside :matches(), f.e. #

The original proposal, which morphed into the current :matches()/
:matched() pair, did in fact do this (or something very similar).

It was considered too complicated. I would (now) tend to agree.

(Note that on a less important note, the "#" character could not be
used due to it being used for the id selector.)

 
> And :matches() should also support multiple selectors:
>    B:matches(A # C,C # A)
> is equivalent to
>    A B:selected C,C B:selected A

This looks like it is getting a little complicated...

Let's not worry about extending :matches() to accept comma separated
lists before CSS4, shall we? Currently I am proposing that the _only_
:matches() functionality that should be added to CSS3 is that which
can also be done using the :selected aberration (i.e., only allow
:matches() at the end of a selector).

Then in CSS4 we can loosen that, and allow :matches() everywhere, then
maybe in CSS5 we can introduce :matched().

The advantage of the current proposal is that the selector inside
:matches() and :matched() is just a straight forward selector -- no
new syntax. If you introduced new syntaxes, like '#' to mean "this",
etc..., then you start really complicating the life of the
implementors... And also probably start confusing the authors!

 
> [2] http://www.bath.ac.uk/%7Epy8ieh/internet/wwwstyle/selectors.txt
> about this:
>      NOT EXACT MATCH
>           e.g. [attr="value"]
> I think a ! is missing here?

Thanks. Fixed.


> Should there be negative pseudo-elements? 

What would that mean??? The concept of a negative pseudo-element is
nonsensical, isn't it?


> Or should pseudo-elements simply not add to the specificity weight?

They have the same weight as normal elements, see CSS2. 

-- 
Ian Hickson                            ("`-''-/").___..--''"`-._   
http://www.bath.ac.uk/%7Epy8ieh/        `6_ 6  )   `-.  (     ).`-.__.`)
                                        (_Y_.)'  ._   )  `._ `. ``-..-' fL
Member, Mozilla Quality Assurance     _..`--'_..-_/  /--'_.' ,'
Browser Standards Compliance Team    (il).-''  (li).'  ((!.-'    
Received on Thursday, 27 January 2000 20:02:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:03 GMT