Skip to content

Instantly share code, notes, and snippets.

@cbfrance
Created February 16, 2015 07:17
Show Gist options
  • Save cbfrance/ac285f65529868e7f942 to your computer and use it in GitHub Desktop.
Save cbfrance/ac285f65529868e7f942 to your computer and use it in GitHub Desktop.
Simplest responsive layout with columns()
body.example-responsive-layout {
@include animation("fade-in 2s");
font-family: sans-serif;
// Medium sizes
@media all and (min-width: 800px) {
@include columns(2);
// Use this to break across all of them, like a footer
.footer {
-webkit-column-span: all;
-moz-column-span: all;
column-span: all;
}
// Dont break (wrap) columns inside some elements
.bridgeEmbed__item {
@include column-break(inside, avoid);
}
}
// Largest size (more than a min width) gets a third column
@media all and (min-width: 1200px) {
@include columns(3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment