Skip to content

Support for media queries? #6

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

Closed
sampurcell93 opened this issue Aug 15, 2015 · 2 comments
Closed

Support for media queries? #6

sampurcell93 opened this issue Aug 15, 2015 · 2 comments
Labels

Comments

@sampurcell93
Copy link

Hi, I noticed that when using this plugin, when I insert a media query into the css string:

@media all and (max-width: 600px) {
    & .myElement {...}
}

The output in the browser does not convert & to the namespace. Is there something I am missing here? Thanks! This is a great plugin, it's very useful.

@sampurcell93
Copy link
Author

Actually, I realized that it's not that the & is never being converted inside the media query. It's the first instance of a & inside the query that is not being transformed.

A quick fix is to include & {} at the top of the query.

@sampurcell93
Copy link
Author

Thank you for the quick fix, Rick. The media query problem is resolved. However, I noticed that now, when using multiple selectors, like & .copyright, & .sup, the second & is not converted to the namespace.

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

No branches or pull requests

2 participants