Created
June 25, 2012 15:10
-
-
Save sirbrad/2989193 to your computer and use it in GitHub Desktop.
Mobile first button abstraction
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
/** | |
* Mobile first button abstraction | |
*/ | |
.btn { | |
display: block; | |
text-align: center; | |
text-decoration: none; | |
padding: 1em 0; | |
box-sizing: border-box; | |
} | |
@media screen and (min-width: 600px) { | |
.btn { | |
display: inline-block; | |
padding: 1em; | |
} | |
} | |
/* Demonstrate btn modifiers */ | |
.btn--twitter { | |
background-color: #2fa2cc; | |
border: 2px solid rgba(255, 255, 255, 0.8); | |
color: #fff; | |
} | |
.btn--github { | |
background-color: #ccc; | |
border: 2px solid rgba(255, 255, 255, 0.8); | |
color: #000; | |
} | |
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
<a href="#" class="btn btn--twitter">Twitter</a> | |
<a href="#" class="btn btn--github">Github</a> |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment