Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media queries will be preferred over later defined global selectors #36

Open
GoogleCodeExporter opened this issue Mar 25, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I found the bug when using and overriding padding in Bootstrap .jumbotron 
classes.

Description: To simplify the problem look at this example to provoke the 
respond.js bug:

    .shouldBeGreen {
      display: table-cell;
      background-color: gray;
      width: 100px;
      height: 100px;
      text-align: center;
      vertical-align: middle;
    }

    @media screen and (min-width: 50px) {
      .shouldBeGreen {
        background-color: red;
        font-weight: bold;
      }
    }


    /* Later in the CSS or in another LESS file... */


    /* Will be overridden by respond.js */
    .shouldBeGreen {
      background-color: green;
    }

Open my attached example page in Chrome/FF/Opera/Safari and IE8 (emulated or 
not) to compare the problem.


Behaviour: The script picks all relevant media query parts and puts them after 
the source CSS file which results in overriding all associated selectors 
defined after the media query.

Solution: I racked my brains about this, but don't have a solution at this 
point.

Here is my bug report to Respond.js which has exactly the same problem: 
https://github.com/scottjehl/Respond/issues/225

Original issue reported on code.google.com by [email protected] on 16 Sep 2013 at 1:58

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant