W3C home > Mailing lists > Public > www-style@w3.org > March 2004

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

From: liorean <liorean@f2o.org>
Date: Thu, 11 Mar 2004 14:15:21 -0500 (EST)
Message-ID: <4050BAB9.5050101@f2o.org>
To: Boris Zbarsky <bzbarsky@MIT.EDU>, "www-style@w3.org" <www-style@w3.org>



Boris Zbarsky wrote:
>>> :not(:link) { link: url(foo); }
>>>
>>>does trigger alarm bells)

Why? CSS shouldn't change the actual sematic meaning of elemnts in a 
document (in difference to css generated content, which CSS will be the 
sole semantic provider to), it should just change the presentation - 
which in this case makes it behave as a link. Why make things difficult 
by making css change the semantics as well?
I've said it before, but if you instead make a selector syntax that 
matches css properties or property-value pairs (which would be immensely 
useful for many other cases, e.g. my comments on css3-hyperlinks 
earlier), then you could do the same as your example without making CSS 
change the semantics.

(I don't know if you here agree with me, but I consider semantics a 
property of the document and the document alone, not in any way related 
to presentational )

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

Yes. This is a document element, it provides it's own semantics.

>>It would select every element that currently isn't a link. Then it tries 
>>to create a link using
>>
>> link:url(foo);
>>
>>If attribute "foo" contains a valid URI, the link is created and the 
>>selector doesn't apply anymore.

Well, that's not the interpretation I would make, for the reasons stated 
above. Semantics do not belong in CSS and considering an elemnt to be a 
link should not be based on CSS, it should be based on data inside the 
document or the namespace or associated validation method alone. - 
Unless there's a good light-weight way of describing the semantics of a 
document that I've overlooked.

> That would be violating a fundamental design constraint of CSS -- property
> values cannot affect what rules apply to an element.

Well, as I said, a css property or property-value pair matching selector 
would be very useful, and I can't belive it would be all that 
complicated for user agents to support, as long as there's a way of 
preventing circular matching defined in the specification.

-- 
David "liorean" Andersson

ViewStyles, ViewScripts, SwitchStyles and GraphicsInfo bookmarklets:
<http://liorean.web-graphics.com/>
Hangouts:
<http://codingforums.com/> <http://yourmusicforums.com/>
Received on Friday, 12 March 2004 06:11:46 GMT

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