Skip to content

Instantly share code, notes, and snippets.

@tylerchilds
Created April 15, 2014 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerchilds/10789743 to your computer and use it in GitHub Desktop.
Save tylerchilds/10789743 to your computer and use it in GitHub Desktop.
Sass (scss) retain mobile styles on desktop in a mobile-first approach
.btn-container{
overflow: hidden;
.btn,
&.desktop .btn{
width: 49%;
margin: 5px 0;
float: left;
&:first-child{
margin-right: 1%;
}
&:last-child{
margin-left: 1%;
}
}
.btn{
@media screen and (min-width: 768px){
width: auto;
float: none;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment