Created
August 29, 2013 02:55
-
-
Save MrOrz/6373773 to your computer and use it in GitHub Desktop.
@extending a selector within the same @media directive still gives deprecation warning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A placeholder factory that generates a placeholder. | |
=btn-placeholder($border-color) | |
%btn | |
border: 1px solid $border-color | |
border-radius: 8px | |
// Generate a %btn placeholder here. | |
+btn-placeholder(#000) | |
// Use the %btn placeholder in the following two classes | |
.btn-error | |
@extend %btn | |
background: #f00 | |
.btn-success | |
@extend %btn | |
background: #0f0 | |
@media screen and (min-width: 750px) | |
// Here we invoke the placeholder factory again, | |
// this time from within the @media | |
+btn-placeholder(#999) | |
// The following classes in @media uses the placeholder | |
// inside the @media. | |
.btn-error | |
@extend %btn | |
background: #c00 | |
.btn-success | |
@extend %btn | |
background: #0c0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Tried it and doesn't seem to compile. I guess it became deprecated.