Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problem with @media
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
matt  
View profile  
 More options Mar 24 2010, 1:42 pm
From: matt <matthew.milbe...@gmail.com>
Date: Wed, 24 Mar 2010 10:42:50 -0700 (PDT)
Local: Wed, Mar 24 2010 1:42 pm
Subject: Problem with @media
Hi,

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!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Johansen  
View profile  
 More options Mar 29 2010, 4:50 am
From: Christian Johansen <chrisj...@gmail.com>
Date: Mon, 29 Mar 2010 10:50:42 +0200
Local: Mon, Mar 29 2010 4:50 am
Subject: Re: Problem with @media

Hi Matt,

On Wed, Mar 24, 2010 at 19:42, matt <matthew.milbe...@gmail.com> wrote:
> I've been using Juicer to modularize my CSS, and it's been great.

Glad you like it!

This is definitely a bug in Juicer. As of now Juicer does not support @media
at all. Juicer takes care only to process @import's found before the first
line of code, in order to speed things up. Additionally it removes all
@import statements when done, which obviously does not make sense when it is
removing statements that wasn't processed. This needs to be fixed, but I'm
afraid I don't have time to fix it very soon. If someone wants to chip in,
please do!

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

Yeah, Juicer shouldn't force you to do anything you don't want to.

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

Yet another case Juicer does not support. What's the best way for Juicer to
process this? To inline the file inside a @media block? Are those
equivalent, and more importantly, is browser support the same for @import
file mediatype; and  @media mediatype { css }?

--
MVH
Christian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »