-
Notifications
You must be signed in to change notification settings - Fork 464
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
Extending placeholders which have nested media queries leaks placeholder into CSS output #316
Comments
You can work around this by putting the rules that are inside the mediaquery inside another selector.
to:
|
@cgarstin Why have I never seen this?! While this feels like a hack, it does work. |
Agreed, feels dirty, but awesome workaround for the moment until this is fixed properly. 👍 |
Be aware that nested media rules are a CSS3 feature and not supported by CSS2. |
+1 on this issue |
+1 |
Hey guys there is a better cleaner way. Just use this:
Hope this helps all you libsassers trying to get it working! |
This seems to work with latest master! //CC @xzyfer |
@media screen and (min-width: 300px) {
body {
max-width: 80%; } }
|
Never mind my previous comment I was confusing this issue with #317 |
The spec for this is in https://github.com/sass/sass-spec/tree/master/spec/regressions. Do you know what the folder is about @mgreter ? |
Not really. IMHO I recovered this via |
I returned the regression specs to their appropriate folders sass/sass-spec#246. |
This is fixed and will be 3.2. |
Abstract
Using a placeholder selector, calling a mixin which wraps a media-query, the placeholder selector is leaked into the CSS output.
Detail
Given the following SCSS:
Expected
The output of sass (3.3.1 and 3.2.15)
Actual
The output of libsass (actually, node-sass 0.8.3 which is based off of 1122ead)
As you can see the placeholder
%foo
should bebody
but it is not. This is also the same case with multiple selectors extending off of %foo, it still displays %foo instead of the multiple classes that were extended.I'm quite sure this is only media-query based, I have a reduced test-case with mixins:
The output of this is identical in SASS (3.3.1 and 3.2.15) and 1122ead:
Further more, multiple mixins also work the same - for example:
Produces the same output.
The text was updated successfully, but these errors were encountered: