- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Thu, 11 Mar 2004 13:26:51 -0500
- To: "Anne van Kesteren (fora)" <fora@annevankesteren.nl>
- Cc: www-style@w3.org
> >description { color: red } > >:link { color: green !important } > > > >:not(:link) { link: url(ref); } > I would say green, but as you point out, that would "violate a > fundamental design constraint of CSS -- property values cannot affect > what rules apply to an element." It also violates the definition of :not. The same node is being matched by :link and :not(:link) if you're insisting that it's a link that's colored green. > There are probably good reasons for that, I suppose. Yes. Like the fact that to figure out what the property values are you have to know what rules apply. If the former can affect the latter, the problem is not solvable, is it? > But when we something like the 'link' property would exist, all elements that > are links would be expressed, in a UA that supports CSS, with that particular > property. That's even worse, because the UA will probably be using :link (or some equivalent) for its default link styling too. So now we're back to the problem of having rules in the UA sheet applying or not based on the values of properties. > That would be a UA style sheet (minimized of course, leaving out > @namespace etc.). A document author style sheet could then match all > unvisited links using ':link'. I'm not sure why you're drawing this weird distinction between UA and author sheets... Is there a basis for this? > It was just to point out that "Does it make sense to have links that :link > does not match" doesn't make sense. That was merely a proposal to resolve the logical contradiction. The precise proposal was "Whether :link matches or not is independent of the value of the 'link' property." This does lead to sub-optimal behavior. But the alternative (having it depend on the value of the property) is not viable within the constraints of the logical system that is CSS. If you can propose an alternate logical system that applies rules to nodes, handles this case, and is identical to CSS in the cases where CSS is defined, please do so. Boris -- The study of non-linear physics is like the study of non-elephant biology.
Received on Thursday, 11 March 2004 13:26:54 UTC