I've been using Juicer to modularize my CSS, and it's been great.
However, I've run into a case where it doesn't seem to work. I'm
using Juicer 1.0.2 without the YUI Compressor. (I usually use YUI
Compressor, but not while testing this case.)
When I tried modularizing the print media CSS, Juicer did not process
any @import statements inside the @media block. Here's an example
@import "file1.css";
@import "file2.css";
@media print{
@import "print1.css";
@import "print2.css";
}
The output contains an empty @media block:
@media print {
}
I could put my print CSS in a separate file built with Juicer, but
that would require another HTTP request, and I'd like to avoid that.
(Yes, it matters.)
I also tried the W3C media dependency version of @import:
@import "print1.css" print;
It seems Juicer is unaware of the media type -- the output didn't
reflect it.
Another possibility I haven't validated is to have the a complete
media block in each included file, but this is sub-optimal due to the
extra bytes for the repeated "@media ..." strings. (I want to
generate the minimum file size possible.)
The best option I can think of is for Juicer to handle the nested
@import statements. Is there a way to do it? If not, what is the
best option?
Thanks!
I've been using Juicer to modularize my CSS, and it's been great.
However, I've run into a case where it doesn't seem to work. I'm
using Juicer 1.0.2 without the YUI Compressor. (I usually use YUI
Compressor, but not while testing this case.)
When I tried modularizing the print media CSS, Juicer did not process
any @import statements inside the @media block. Here's an example
@import "file1.css";
@import "file2.css";
@media print{
@import "print1.css";
@import "print2.css";
}
The output contains an empty @media block:
@media print {
}
I could put my print CSS in a separate file built with Juicer, but
that would require another HTTP request, and I'd like to avoid that.
(Yes, it matters.)
I also tried the W3C media dependency version of @import:
@import "print1.css" print;
It seems Juicer is unaware of the media type -- the output didn't
reflect it.