[css-d] @import media rule

2006-05-11 Thread jack fredricks
Hi all,

I've done a bit of a google - with no luck..so I thought I'd mozie on
over here...

I can't seem to get this rule to work on IE6 or FF;

@import url("fineprint.css") print;

http://www.w3.org/TR/CSS2/cascade.html#at-import


The file and the file location are fine (a standard LINK element
works). It's just the @import version that breaks.

Is this just bad UA support? Is there a known work around? or am I just mad?

thanks
jzf
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] @import media rule

2006-05-11 Thread Robert O'Rourke
jack fredricks wrote:
> Hi all,
>
> I've done a bit of a google - with no luck..so I thought I'd mozie on
> over here...
>
> I can't seem to get this rule to work on IE6 or FF;
>
> @import url("fineprint.css") print;
>
> http://www.w3.org/TR/CSS2/cascade.html#at-import
>
>
> The file and the file location are fine (a standard LINK element
> works). It's just the @import version that breaks.
>
> Is this just bad UA support? Is there a known work around? or am I just mad?
>
> thanks
> jz
lo,

Had the same issue recently, IE and surprisingly FF don't seem to 
support that structure unfortunately, To select media specific css i 
used the  element and just a normal @import rule for the main css, 
ah well  :(
You could always try

@media print { @import url("print.css"); }

but i've not tested it.

Rob
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] @import media rule

2006-05-11 Thread jack fredricks
> lo,
>
>Had the same issue recently, IE and surprisingly FF don't seem to
> support that structure unfortunately, To select media specific css i
> used the  element and just a normal @import rule for the main css,
> ah well  :(
>You could always try
>
>@media print { @import url("print.css"); }
>
>but i've not tested it.
>
>Rob

using that rule..IE6 imports the stylesheet, but applies it to screen
media also (and not just print as we hoped).

FF didnt import it at all.

thanks anyway :)
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] @import media rule

2006-05-12 Thread Gunlaug Sørtun
jack fredricks wrote:

> I can't seem to get this rule to work on IE6 or FF;
> 
> @import url("fineprint.css") print;
> 
> http://www.w3.org/TR/CSS2/cascade.html#at-import
> 
> 
> The file and the file location are fine (a standard LINK element 
> works). It's just the @import version that breaks.
> 
> Is this just bad UA support?

Yes!

> Is there a known work around?

Workaround... yes.

> or am I just mad?

Hmmm... probably :-)

Workaround:

I use the following method to @import print-stylesheets into my main
stylesheets...

@import url("fineprint.css");

(yes, an ordinary @import without media-pointer.)

Then, in my 'fineprint.css' i wrap the entire styleset in an ordinary...

@media print {

...all print styles...

}

...and all browsers that understand @media will apply the css for
printing. That excludes IE/Mac and IE4/win and other old browsers.

I use the same @media rule in stylesheets for screen, print and
projection, and whatever other media I want to support.
IE/Mac is let in on screen-styles through a hack, and also given its own
set of styles for screen in order to overcome some of its limitations.


More info:




regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] @import media rule

2006-05-16 Thread jack fredricks
> Workaround:
>
> I use the following method to @import print-stylesheets into my main
> stylesheets...
>
>@import url("fineprint.css");
>
> (yes, an ordinary @import without media-pointer.)
>
> Then, in my 'fineprint.css' i wrap the entire styleset in an ordinary...
>
>@media print {
>
>...all print styles...
>
>}
>
> ...and all browsers that understand @media will apply the css for
> printing. That excludes IE/Mac and IE4/win and other old browsers.
>
> I use the same @media rule in stylesheets for screen, print and
> projection, and whatever other media I want to support.
> IE/Mac is let in on screen-styles through a hack, and also given its own
> set of styles for screen in order to overcome some of its limitations.

Hi all/Georg,

Thanks,

I have tried;

1) imported print.css for all media
2) wrapped the content of print.css in an "@media print" rule

but it still doesnt work for silly IE6 FF is fine.

FF web dev toolbar shows that print.css was linked properly.

Just a tip - Wrapping this way allows u change the "@media print" rule
to "@media all", effectively allowing you to see what your page will
print like (as ofc is print preview).

I guess that means my question is; Is there a way to import a print
only style sheet for IE without using a LINK element?

thanks again
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] @import media rule

2006-05-17 Thread Gunlaug Sørtun
jack fredricks wrote:

> I have tried;
> 
> 1) imported print.css for all media
> 2) wrapped the content of print.css in an "@media print" rule
> 
> but it still doesnt work for silly IE6 FF is fine.
> 
> FF web dev toolbar shows that print.css was linked properly.
> 
> Just a tip - Wrapping this way allows u change the "@media print"
> rule to "@media all", effectively allowing you to see what your page
> will print like (as ofc is print preview).
> 
> I guess that means my question is; Is there a way to import a print 
> only style sheet for IE without using a LINK element?

I don't think so, as a parsing bug in IE/win - which seems to be present
in all Trident-based versions, included IE7, will make that browser look
for "another" file when '@import ... print' is used. I use that parsing
bug as a hack[1] - replacing 'conditional comments', but I still have to
rely on the @media rule in the stylesheet to prevent it from being a
'media all' stylesheet.

Now, all my testing shows that IE6 picks up _my_ printing-styles
correctly the way I have applied the @import and @media rules - although
IE/win can be quite stubborn when it comes to overriding some of the
dedicated screen styles with the equivalent print styles.

Do you have a link so I can look a bit closer at the problem you are
experiencing?

regards
Georg

[1]http://www.gunlaug.no/contents/wd_additions_12.html
-- 
http://www.gunlaug.no
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/