Created
February 16, 2015 07:17
-
-
Save cbfrance/ac285f65529868e7f942 to your computer and use it in GitHub Desktop.
Simplest responsive layout with columns()
This file contains hidden or 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
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