Re: [css3-hyperlinks] inclusion of Clink in next WD

Boris Zbarsky wrote:

>Style:
>
>description { color: red }
>:link { color: green !important }
>
>:not(:link) { link: url(ref); }
>
>Markup:
>
><description ref="http://somewhere">Text</description>
>
>What color is the text?  Why?  Does it make sense to have links that :link does
>not match?
>
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."

There are probably good reasons for that, I suppose. 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. For example:

  a[href]{
   link:url(href); /* not sure, but I think that
                      'link:attr(href,url);' makes
                      more sense */
  }
  area[href]{
   link:url(href);
  }

  /* etc. */

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 saying that only a UA style sheet 
can contain that property, that would be nonsense. It was just to point 
out that "Does it make sense to have links that :link does not match" 
doesn't make sense.

-- 
 Anne van Kesteren
 <http://annevankesteren.nl/>

Received on Thursday, 11 March 2004 12:48:48 UTC