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
Selectors only recognized in first stylesheet?
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
  4 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 was successful
 
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
 
David  
View profile  
 More options Nov 29 2011, 8:25 pm
From: David <dmbaugh...@gmail.com>
Date: Tue, 29 Nov 2011 17:25:45 -0800 (PST)
Local: Tues, Nov 29 2011 8:25 pm
Subject: Selectors only recognized in first stylesheet?
I'm creating a responsive layout using multiple stylesheets:

        <link rel="stylesheet" href="/css/style.css" type="text/css"
media="screen" title="Main stylesheet" />
        <link rel="stylesheet" href="/css/wide.css" media="screen and (min-
width: 501px)"  />
        <link rel="stylesheet" href="/css/narrow.css" media="screen and (min-
width: 501px) and (max-width: 700px)"  />
        <link rel="stylesheet" href="/css/mobile.css" media="screen and (max-
width: 500px)"  />

I've noticed that when I use selectors in anything but the style.css
sheet, they are not recognized when the page loads in IE.  I've ended
up moving most of the rules with selectors to the style.css sheet, but
there are some that I need specifically in the other stylesheets for
layout purposes.

Does selectivizr only work on the primary stylesheet?  Or is there an
issue when it's applied to stylesheets that use media queries?

This is a company intranet site, so I can't provide a link right now,
though I might be able to get a dummy page posted on my personal web
server if necessary.


 
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.
David Baughman  
View profile  
 More options Dec 2 2011, 2:46 pm
From: David Baughman <dmbaugh...@gmail.com>
Date: Fri, 2 Dec 2011 11:46:35 -0800 (PST)
Local: Fri, Dec 2 2011 2:46 pm
Subject: Re: Selectors only recognized in first stylesheet?
Update:  I moved all the layout-specific styles into media queries in
the primary stylesheet (style.css), and those selectors still do not
work in IE8.

/* Notional Example */

.dummy-class:nth-child(2n) {     /* This selector works perfectly in
IE8 using selectivzr */
    background: #0f0;

}

@media screen and (max-width: 700px) {
    .dummy-class:nth-child(2n) {    /* This selector appears to not
work in IE8 */
        background: #ff0;
    }

}

/* End Example */

It looks like selectivizr is unable to use rules that are contained
within media queries at all, whether the media query loads an external
stylesheet like before, or the media query is contained within the
stylesheet itself.

Any ideas?

On Nov 29, 5:25 pm, David <dmbaugh...@gmail.com> wrote:


 
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.
Francesco Spreafico  
View profile  
 More options Dec 2 2011, 2:50 pm
From: Francesco Spreafico <francesco.spreaf...@gmail.com>
Date: Fri, 2 Dec 2011 20:50:56 +0100
Local: Fri, Dec 2 2011 2:50 pm
Subject: Re: Selectors only recognized in first stylesheet?

On Fri, Dec 2, 2011 at 20:46, David Baughman <dmbaugh...@gmail.com> wrote:
> Update:  I moved all the layout-specific styles into media queries in
> the primary stylesheet (style.css), and those selectors still do not
> work in IE8.

I noticed this too... today! I think it may have something to do with
the fact that we're using JavaScript to make those media queries work
in old IEs (I use respond through Modernizr).

Or maybe we're just doing something wrong!

--
Francesco


 
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.
Adamo  
View profile  
 More options Dec 6 2011, 11:28 am
From: Adamo <atwix...@gmail.com>
Date: Tue, 6 Dec 2011 08:28:35 -0800 (PST)
Local: Tues, Dec 6 2011 11:28 am
Subject: Re: Selectors only recognized in first stylesheet?
I just came across the same problem. Thanks for the test case, as I
was about to waste time combining my separate flexible.css responsive
file and main css file to see if that helped.

I also thought there may have been a conflict with the css3-media-
queries.js plugin for ie8. I tried swapping the order in which both
this plugin and selectivzr are loaded, but it did not change the
problem described here.

I'm thinking now it may be a syntax issue with the @media statements
not jiving with the selectivzr plugin?

On Dec 2, 2:46 pm, David Baughman <dmbaugh...@gmail.com> wrote:


 
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 »