Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / August 2003



Tip: Looking for answers? Try searching our database.

Linking generated content

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Headless - 28 Aug 2003 09:43 GMT
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:

>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

Signature

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

Jukka K. Korpela - 28 Aug 2003 10:30 GMT
> Should linking generated content work?

I don't think you are linking generated content.

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

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

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

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

Signature

Yucca, http://www.cs.tut.fi/~jkorpela/

Headless - 28 Aug 2003 17:38 GMT
>> 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

Signature

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

Kris - 28 Aug 2003 17:44 GMT
> >> 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
[quoted text clipped - 5 lines]
> 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.

Signature

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

Headless - 28 Aug 2003 21:11 GMT
>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.

I've been doing that for ages.

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

IE (all versions), Opera 6 and lower, NS4 and probably quite a few other
browsers all fail to get my CSS, so the chance that the site is shown
without author stylesheets is probably >95%.

Headless

Signature

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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.