Created
August 29, 2014 23:11
-
-
Save illepic/efe45c9e9e2bdd0a124d to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
// Solution: change .button extendable to %button | |
%button { | |
background: green; | |
color: white; | |
padding: 20px; | |
font-size: 12px; | |
} | |
// Then just have a .button class @extend %button. This way html | |
// elements with .button still get expected styles | |
.button { | |
@extend %button; | |
} | |
// All instances of "@extend .button" need to be changed to "@extend %button" | |
.thingy1 { | |
@extend %button; | |
} | |
.thingy2 { | |
@extend %button; | |
font-size: 48px; | |
} | |
// So now styling against .button no longer blows everything up | |
.something .button { | |
font-weight: bold; | |
} | |
.another-thing .button { | |
padding: 10px; | |
} | |
This file contains 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
.button, .thingy1, .thingy2 { | |
background: green; | |
color: white; | |
padding: 20px; | |
font-size: 12px; | |
} | |
.thingy2 { | |
font-size: 48px; | |
} | |
.something .button { | |
font-weight: bold; | |
} | |
.another-thing .button { | |
padding: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment