Created
March 14, 2015 21:36
-
-
Save jasonkmccoy/e0fb046ba1d85cacc467 to your computer and use it in GitHub Desktop.
flex-direction mixin
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
@mixin flex-direction($direction) { | |
@if $direction == column { | |
-webkit-flex-direction:vertical; | |
-moz-flex-direction:vertical; | |
-ms-flex-direction:column; | |
-webkit-flex-direction:column; | |
flex-direction:column; | |
} @else { | |
-webkit-flex-direction:horizontal; | |
-moz-flex-direction:horizontal; | |
-ms-flex-direction:row; | |
-webkit-flex-direction:row; | |
flex-direction:row; | |
} | |
} | |
// Usage | |
div { | |
@include flex-direction(column); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.developerdrive.com/2014/11/15-essential-sass-mixins/