Created
November 4, 2014 14:02
-
-
Save cjbell/c351fa8a7dec525c2764 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
%unstyled-anchor { | |
text-decoration: none; | |
color: inherit; | |
} | |
%button { | |
@extend %unstyled-anchor; | |
font-weight: bold; | |
padding: 1em 3em; | |
text-align: center; | |
} | |
%button--primary { | |
background-color: hotpink; | |
color: #fff; | |
} | |
.sign-up {} | |
.sign-up__cta { | |
@extend %button--primary; | |
} | |
.sign-in {} | |
.sign-in__cta { | |
@extend %button; | |
} |
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
<div class="sign-up"> | |
<button class="sign-up__cta">Sign up</button> | |
</div> | |
<div class="sign-in"> | |
<button class="sign-in__cta">Sign in</button> | |
</div> |
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
/* Resulting CSS */ | |
.sign-up__btn { | |
background-color: hotpink; | |
color: #fff; | |
} | |
.sign-up__btn, | |
.sign-in__btn { | |
font-weight: bold; | |
padding: 1em 3em; | |
text-align: center; | |
} | |
.sign-up__btn, | |
.sign-in__btn { | |
text-decoration: none; | |
color: inherit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment