Skip to content

Instantly share code, notes, and snippets.

@thaerlabs
Created May 8, 2015 13:45
Show Gist options
  • Save thaerlabs/4c6de4604b36c68a50d3 to your computer and use it in GitHub Desktop.
Save thaerlabs/4c6de4604b36c68a50d3 to your computer and use it in GitHub Desktop.
BNoWeQ
h1 CSS Flexbox
.example
h2 3 column layout
.example-page.example-layout
header header
.body
.col-1 Main
.col-2 Navigation
.col-3 sidebar
footer footer
@import "bourbon"
.example-layout
display: flex
flex-direction: column
height: 100vw
header,
footer
padding: 20px
background: #666
color: white
.body
display: flex
flex-grow: 1
background: pink
@media (max-width: 700px)
flex-direction: column
.col-1
background: lightblue
flex-grow: 1
.col-2
background: honeydew
width: 160px
order: -1
.col-3
background: peachpuff
width: 160px
@media (max-width: 700px)
.body
flex-direction: column
.col-2, .col-3
width: auto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment