Skip to content

Instantly share code, notes, and snippets.

@remybach
Forked from sirbrad/dabblet.css
Created June 25, 2012 15:22
Show Gist options
  • Save remybach/2989236 to your computer and use it in GitHub Desktop.
Save remybach/2989236 to your computer and use it in GitHub Desktop.
Mobile first button abstraction
/**
* Mobile first button abstraction
*/
.btn {
background-color: #ccc;
border: 2px solid rgba(255, 255, 255, 0.8);
box-sizing: border-box;
color: #000;
display: block;
padding: 1em 0;
text-align: center;
text-decoration: none;
width: 100%;
}
@media screen and (min-width: 600px) {
.btn {
display: inline-block;
padding: 1em;
width: auto;
}
}
/* Demonstrate btn modifiers */
.btn:hover, .btn[class*=active] {
background-color: #2fa2cc;
border: 2px solid rgba(255, 255, 255, 0.8);
color: #fff;
}
<a href="#" class="btn active">Twitter</a>
<a href="#" class="btn">Github</a>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment