Last active
May 16, 2016 14:29
-
-
Save sebastiansulinski/5944a42344573c48c52a6e1d7061b330 to your computer and use it in GitHub Desktop.
Flex box same height with background colour
This file contains 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
.flex-wrapper { | |
&:before, | |
&:after { | |
display: block; | |
} | |
&, .flex-item { | |
display: -webkit-box; | |
display: -moz-box; | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
} | |
-webkit-flex-wrap: wrap; | |
-ms-flex-wrap: wrap; | |
flex-wrap: wrap; | |
.flex-item { | |
.flex-container { | |
-webkit-box-flex: 1; | |
-moz-box-flex: 1; | |
-webkit-flex: 1; | |
-ms-flex: 1 0 auto; | |
flex: 1 0 auto; | |
width: 100%; | |
padding: 1rem; | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
&.bg-white { | |
background-color: #fff; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example with Zurb Foundation grid (non flex one) would be