HighDots Forums  

Linking generated content

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Linking generated content in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Headless
 
Posts: n/a

Default Linking generated content - 08-28-2003 , 04:43 AM






Should linking generated content work? Example:

span:before{content:"foobar"}

<a href="foobar.htm"><span></span></a>

I stumbled across this bit in the CSS2 spec:

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).
It works both in Opera and Mozilla, but should it?

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.


Headless

--
Email and usenet filter list: http://www.headless.dna.ie/usenet.htm


Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Linking generated content - 08-28-2003 , 05:30 AM






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/


Reply With Quote
  #3  
Old   
Headless
 
Posts: n/a

Default Re: Linking generated content - 08-28-2003 , 12:38 PM



Jukka K. Korpela wrote:

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.
How do you propose to get that to work in non CSS capable UA's or when
the author stylesheet is ignored or disabled?


Headless

--
Email and usenet filter list: http://www.headless.dna.ie/usenet.htm


Reply With Quote
  #4  
Old   
Kris
 
Posts: n/a

Default Re: Linking generated content - 08-28-2003 , 12:44 PM



In article <robskvk40p6q33q2vaka8cd06v3j5nq2sv (AT) 4ax (DOT) com>,
Headless <me (AT) privacy (DOT) net> wrote:

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.

How do you propose to get that to work in non CSS capable UA's or when
the author stylesheet is ignored or disabled?
As an answer to this and as an advice to the OP:

The widget is obviously reliant on JavaScript. So that is they key. Have
an embedded script generate the content needed for this widget. In the
rare occassion that JS is enabled and CSS is disabled in a DOM-compliant
browser, then no worries; it is obviously disabled for a reason and i
think it is reasonable to assume that the user is aware of this and
realizes that a styleswitcher will not work when no styles are there to
be shown. Unless of course you can detect stylesheets enabled through
JS, but I don't know how to do that.

--
Kris
kristiaan (AT) xs4all (DOT) netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.