Created
December 27, 2016 01:07
-
-
Save p810/eb13055ad2559fef572a1454acca6ffe to your computer and use it in GitHub Desktop.
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
.row::after { | |
clear: both; | |
content: ""; | |
display: block; | |
} | |
.columns, | |
[class*="col-"] { | |
float: left; | |
padding: 1rem; | |
} | |
.generate-columns(@prefix, @columns, @i: 1) when (@i =< @columns) { | |
.@{prefix}-@{i} { | |
width: (@i * 100% / @columns); | |
} | |
.generate-columns(@prefix, @columns, (@i + 1)); | |
} | |
.generate-columns(col, 12); | |
/* Phone (landscape) columns */ | |
@media only screen and (max-width: 767px) { | |
.generate-columns(phone, 12); | |
} | |
@media only screen and (max-width: 767px) and (orientation: portrait) { | |
.generate-columns(phone-portrait, 12); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment