-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Sprites inside @media queries #617
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
Comments
ho hum this is a bad bug @chriseppstein |
It's not a bug. The mixins set up the per-sprite properties and then extend the base class. In order for this to work, you have to define the base class in the proper media context. This means that you can't use the magic import, but you can run
and then edit that file to meet your needs and import it instead. Maybe we should add some docs for this? |
If it's not a bug, some docs with examples would be really great. (: |
Do you have an exemple of Compass sprites inside of media queries? |
If anyone still needs a solution for using sprites within media queries I've created a mixin that will help you. |
@dfadler Man, you just saved my day!! |
Another solution I've created to serve quality sprites for high dpi screens: https://gist.github.com/d009f35ca1bda8d71f52.git |
I'm using sprites inside a
@media screen and (max-width: 480px)
query.But the generated CSS will apply to all elements and not only those inside the media-query. So it will override my other sprite.
Example:
main.sass:
_mobile.sass:
The generated CSS looks like this:
So the second sprite will override the first one, even if it's just indented for mobile usage.
The text was updated successfully, but these errors were encountered: