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

On 3/11/04 10:26 AM, "Boris Zbarsky" <bzbarsky@MIT.EDU> wrote:

> 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 actually kind of makes sense, if you think of it this way:

:link matches an element that is *semantically* a hyperlink.

The 'link' property merely *presents* an interactive hyperlink.

You don't actually have to have ":link" apply to elements with a 'link'
property, because whatever rules you're using to set that 'link' property
can also be used to set the rest of the styling of that hyperlink.  E.g. if
you have

:link { color:green }

and

blockquote[cite]:after {
  content:"[" attr(cite) "]";
  link:url(attr(cite));
}

instead of hoping for or depending on that separate :link rule to apply to
color the link green, simply do so in the same rule that sets the 'link'
property:

blockquote[cite]:after {
  content:"[" attr(cite) "]";
  link:url(attr(cite));
  color:green;
}



Another way to do this would be invent a sort of "Cascading Semantic Sheets"
that simply reused CSS syntax to declare semantics (and perhaps typing?),
like linking semantics, on a tree of XML, so you could declare elements with
certain characteristics to be hyperlinks (e.g. all elements with an 'href'
attribute), which later would trigger :link/:visited selectors in style
sheets.

Obviously all Semantic Sheets would have to be processed before any/all
Style Sheets (similar to how a validating XML processor processes the DTD
for the document before it does any styling).


I'm not certain which behavior is the one people are looking for.  Perhaps
different people are looking for each.


> This does lead to sub-optimal behavior.

Example?

E.g. you can *present* any element as a replaced element by simply using the
CSS3 'content' property, e.g.

p { content:url(image.png) }

But that doesn't mean that <p> tags *are* (in terms of meaning/semantics)
replaced elements. To do that you could use the following XHTML2 snippet:

<p src="image.png">This paragraph of descriptive text would be replaced by
an image in an XHTML2 user agent.</p>


> 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.

Agreed.


Tantek

Received on Thursday, 11 March 2004 16:31:39 UTC