Created
September 30, 2014 12:52
-
-
Save ReneKriest/0fe6698ea02fd90ac11f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<div class='flexContainer height'> | |
<div>Item</div> | |
</div> |
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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin flexContainer ($flex-direction: row, $flex-wrap: wrap, $align-items: center, $justify-content: center) { | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
// row / column | |
-ms-flex-direction: $flex-direction; | |
-webkit-flex-direction: $flex-direction; | |
flex-direction: $flex-direction; | |
// wrap / no-wrap | |
-ms-flex-wrap: $flex-wrap; | |
-webkit-flex-wrap: $flex-wrap; | |
flex-wrap: $flex-wrap; | |
// align cross axis | |
-ms-flex-align: $align-items; | |
-webkit-align-items: $align-items; | |
align-items: $align-items; | |
// align axis | |
-ms-flex-pack: $justify-content; | |
-webkit-justify-content: $justify-content; | |
justify-content: $justify-content; | |
} | |
.flexContainer { | |
@include flexContainer(row, no-wrap, center, center) | |
} | |
.height { | |
height: 300px; | |
height: 90vh; | |
} |
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
.flexContainer { | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
-ms-flex-direction: row; | |
-webkit-flex-direction: row; | |
flex-direction: row; | |
-ms-flex-wrap: no-wrap; | |
-webkit-flex-wrap: no-wrap; | |
flex-wrap: no-wrap; | |
-ms-flex-align: center; | |
-webkit-align-items: center; | |
align-items: center; | |
-ms-flex-pack: center; | |
-webkit-justify-content: center; | |
justify-content: center; | |
} | |
.height { | |
height: 300px; | |
height: 90vh; | |
} |
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
<div class='flexContainer height'> | |
<div>Item</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment