Last active
February 15, 2016 15:55
-
-
Save rhoover/ce52f50774fd00c7068d to your computer and use it in GitHub Desktop.
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
/* style.scss */ | |
%button { | |
min-width: 100px; | |
padding: 1em; | |
border-radius: 1em; | |
&-twitter { | |
@extend %button; | |
color: #fff; | |
background: #55acee; | |
} | |
&-facebook { | |
@extend %button; | |
color: #fff; | |
background: #3b5998; | |
} | |
} | |
/* Which we can use thus: */ | |
.btn { | |
&--twitter { | |
@extend %button-twitter; | |
} | |
&--facebook { | |
@extend %button-facebook; | |
} | |
} | |
/* Which Gives Us This style.css:*/ | |
.btn--twitter, .btn--facebook { min-width: 100px; padding: 1em; border-radius: 1em; } | |
.btn--twitter { color: #fff; background: #55acee; } | |
.btn--facebook { color: #fff; background: #3b5998; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment