HighDots Forums  

Re: Media Type / @Import url

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


Discuss Re: Media Type / @Import url in the Cascading Style Sheets forum.



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

Default Re: Media Type / @Import url - 06-28-2004 , 06:43 AM






alun (AT) pentangle (DOT) co.uk (Alun) wrote:

Quote:
@import url("style/screen2.css") screen;
@import url("style/print.css") print;

IE6.0 Does'nt render the styles at all but Opera and Netscape do.
UAs are notoriously buggy in their support for CSS media rules,
unsurprisingly IE is again amongst the worst.

What works for me is a combination of linking, importing and media
wrappers inside the css files. I aim to support IE5.5+, Moz and Opera.

Example:
HTML: http://www.pan-europe.utvinternet.ie (also links in a handheld SS)
First SS: http://www.pan-europe.utvinternet.ie/css/one.css
Second SS: http://www.pan-europe.utvinternet.ie/css/two638.css

Note that this method is not spec compliant, a stylesheet that is linked
in without a specified media type is supposed to apply to screen only,
but Opera, Moz and IE all use the print section.

Test extensively in all UAs that *you* want to be compatible with
because of the many bugs.

--
Spartanicus


Reply With Quote
  #2  
Old   
Spartanicus
 
Posts: n/a

Default Re: Media Type / @Import url - 06-28-2004 , 11:37 AM






kchayka <usenet (AT) c-net (DOT) us> wrote:

Quote:
Note that this method is not spec compliant, a stylesheet that is linked
in without a specified media type is supposed to apply to screen only,

Where in the spec does it say this? The media reference I found says
quite the opposite:

URL:http://www.w3.org/TR/CSS2/cascade.html#x5
"In the absence of any media types, the import is unconditional.
Specifying 'all' for the medium has the same effect."
http://www.w3.org/TR/html401/present...tml#adef-media
media = media-descriptors [CI]
This attribute specifies the intended destination medium for style
information. It may be a single media descriptor or a comma-separated
list. The default value for this attribute is "screen".

--
Spartanicus


Reply With Quote
  #3  
Old   
Rijk van Geijtenbeek
 
Posts: n/a

Default Re: Media Type / @Import url - 06-28-2004 , 01:27 PM



On Mon, 28 Jun 2004 17:37:10 +0100, Spartanicus <me (AT) privacy (DOT) net> wrote:

Quote:
kchayka <usenet (AT) c-net (DOT) us> wrote:

Note that this method is not spec compliant, a stylesheet that is
linked
in without a specified media type is supposed to apply to screen only,

Where in the spec does it say this? The media reference I found says
quite the opposite:

URL:http://www.w3.org/TR/CSS2/cascade.html#x5
"In the absence of any media types, the import is unconditional.
Specifying 'all' for the medium has the same effect."

http://www.w3.org/TR/html401/present...tml#adef-media
media = media-descriptors [CI]
This attribute specifies the intended destination medium for style
information. It may be a single media descriptor or a comma-separated
list. The default value for this attribute is "screen".
In practice, browser don't handle it this way. Style sheets without media
attribute are handled as 'media=all'.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen


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.