Skip to content

Instantly share code, notes, and snippets.

@darren131
Created August 21, 2012 00:11
Show Gist options
  • Save darren131/3409606 to your computer and use it in GitHub Desktop.
Save darren131/3409606 to your computer and use it in GitHub Desktop.
Responsive design mixin
// USAGE:
// resize the browser until your layout looks shit
// take note of the viewport size
// plug in that value and add the new styles...
// e.g.
//
// #logo {
// float: left;
// @include respond-to(650px) {
// float:none;
// margin:auto;
// }
// }
@mixin respond-to($size) {
@media only screen and (max-width: $size) { @content; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment