Headless <me (AT) privacy (DOT) net> wrote:
Quote:
Should linking generated content work? |
I don't think you are linking generated content.
Quote:
span:before{content:"foobar"}
a href="foobar.htm"><span></span></a |
You have a link element with a span element with empty content as its
only content. This doesn't sound logical, and its effects on browsers
will vary. Your style sheet does not really link generated content. The
link is there, and the generated content just affects its appearance.
Quote:
Generated content does not alter the document tree. In particular, it
is not fed back to the document language processor (e.g., for
reparsing). |
This means that no markup in generated content is parsed, and the
document's parse tree remains the same - in this case, you still have
just empty content, with span and link markers around it.
Quote:
It works both in Opera and Mozilla, but should it? |
Define "works". Is the linked resource accessible through the link, and
how? Does the link participate in tabbing order? Is it traversed by
indexing robots? How does it appear in a list of all links on the page,
as generated by the browser? And what if CSS is enabled?
Quote:
Context: I have an alternate stylesheet switching UI widget on a
page, I don't want that widget to show up in non CSS UA's and if my
author stylesheet is ignored or disabled. |
If you want to hide something, visually, then visibility: invisible and
display: none would appear to be more logical approaches. Even then, the
question arises whether e.g. an invisible link should be treated as a
link, in the many ways that a document can be processed.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/