Last active
January 2, 2016 15:39
-
-
Save seven-phases-max/8324997 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
// ............... | |
@grid-columns: 3; | |
@grid-gutter-width: 33px; | |
// ............... | |
.grid-column-template { // Ok, the cons: this creates a dummy class in the output | |
position: relative; | |
// Prevent columns from collapsing when empty | |
min-height: 1px; | |
// Inner gutter via padding | |
padding-left: (@grid-gutter-width / 2); | |
padding-right: (@grid-gutter-width / 2); | |
} | |
.make-grid-columns() { | |
.col(); // kickstart it | |
.col(@index: @grid-columns) when (@index > 0) { | |
.col((@index - 1)); | |
.col-xs-@{index}, | |
.col-sm-@{index}, | |
.col-md-@{index}, | |
.col-lg-@{index} { | |
&:extend(.grid-column-template); | |
} | |
} | |
} | |
// ............... | |
.make-grid-columns(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment