- From: Sjoerd Visscher <sjoerd@heeten.nl>
- Date: Tue, 25 Jan 2000 17:21:43 +0100
- To: "www-style" <www-style@w3.org>
> I think for 'simple' cases :matches() is better than :: (or :select), > in particular because it copes with many more cases without explicit > scoping. For more complex cases, scoping is needed: > > A:matches(/attr/ (C B)) > C (A /attr/ B) > A /attr/ (C B) > A /attr/ (C /attr/ B) > > ...or the equivalent of :matches() but starting at the document root, > as in (equivalents to the previous four examples): > > A:matches(/attr/ B:matched(C)) > C B:matched(A /attr/) > A /attr/ B:matched(C) > A /attr/ B:matched(C /attr/) > > Hmm. I like it. :-) Me too. Scoping is not very CSS like, and unclear. But I think :matched is not a good idea. Instead I'd like to propose a 'this' indicator inside :matches(), f.e. # The examples would then become: A:matches(/attr/ B:matches(C #)) C B:matches(A /attr/ #) A /attr/ B:matches(C #) A /attr/ B:matches(C /attr/ #) And :matches() should also support multiple selectors: B:matches(A # C,C # A) is equivalent to A B:selected C,C B:selected A Does this sound like a good idea? > > In fact, pseudo-elements have nothing to do with selecting, it's > > about creating. I would like to see something like: > > > > selector { > > color: green; > > @pseudo-element before { > > content: "["; > > } > > @pseudo-element after { > > content: "]"; > > } > > } > > > > That's also because different pseudo-elements will be used together > > with the same selector at the same time. (often both 'before' and > > 'after' will be used f.e.) > > Interesting, but I think it's probably too late to change the syntax > that radically. The above cuts deep into how pseudo-elements are > treated, and there are already working implementations that have had > bugs wrung out of them, e.g. Mozilla. > I dunno. It's no structural change. > [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? Should there be negative pseudo-elements? Or should pseudo-elements simply not add to the specificity weight?
Received on Tuesday, 25 January 2000 11:21:03 UTC