Created
July 27, 2017 17:07
-
-
Save BTMPL/f151f1a3184712d8db6aa6b41f012d1d to your computer and use it in GitHub Desktop.
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
@gutter: 8px; | |
.Row { | |
display: flex; | |
max-width: 1170px; | |
margin: 0 auto; | |
flex-wrap: wrap; | |
@media screen and (max-width: 640px) { | |
flex-direction: column; | |
} | |
.Row { | |
margin: 0 (-1px * @gutter); | |
} | |
} | |
.Column { | |
flex: 1; | |
padding: 0 @gutter; | |
box-sizing: border-box; | |
} | |
.generate-columns(12); | |
.generate-columns(@n, @i: 1) when (@i =< @n) { | |
.desktop-@{i} { | |
min-width: (100% / (12/@i)); | |
max-width: (100% / (12/@i)); | |
} | |
@media screen and (max-width: 640px) { | |
.mobile-@{i} { | |
min-width: (100% / (12/@i)); | |
max-width: (100% / (12/@i)); | |
} | |
} | |
.generate-columns(@n, (@i + 1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment