question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update messing with media queries

See original GitHub issue

We updated our app from ^0.3.5 to 0.5.0 and we’re having a bunch of specificity issues where the plugin is rendering css in the wrong places and/or using css classes weirdly.

Example

We have a component with the following sass code in it:

 h1 {
    font-size: 34px;
    text-align: center;
    margin: 40px 0 20px;
    @media (max-width: #{$screen-xs-max}) {
      font-size: 24px;
    }
 }

In the old version, this would correctly have the same class twice with one of them having a @media query that affects mobile. However, in the version, the css class changes for mobile and has one less selector. Basically, it goes from .a .b h1 to .a h1 and this causes the browser to render the desktop styles instead.

Any thoughts about what this might be?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
webarkcommented, Jan 11, 2018

ohh hahaha!! nice. ok cool. I’m going to close this issue then. Thanks!

0reactions
bryanhickersoncommented, Jan 10, 2018

@webark when I said the regression was unrelated, I was actually referring to the same app that hassan reported this issue for 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are my CSS3 media queries not working on mobile ...
Actually I switched to the following media Query on iPhone 4 and it works (but I have to change my CSS to accomodate...
Read more >
update - CSS: Cascading Style Sheets - MDN Web Docs
The update CSS media feature can be used to test how frequently (if at all) the output device is able to modify the...
Read more >
5 Reasons Why Your CSS Media Queries Are NOT Working ...
CSS Media queries are an important part of Responsive web design but sometimes they don't work as we expect or th...
Read more >
Working with JavaScript Media Queries | CSS-Tricks
CSS media queries are a core ingredient in any responsive design. ... nothing updates the way it will with CSS right out of...
Read more >
Media Queries are a Hack - Ian Storm Taylor
Change the number of columns in your layout? Update all of your media queries… Change one of your breakpoint widths? Update all of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found