diff options
| author | Bass Jobsen <[email protected]> | 2013-06-26 01:05:45 +0200 |
|---|---|---|
| committer | Bass Jobsen <[email protected]> | 2013-06-26 01:05:45 +0200 |
| commit | 321190535f09b41683589c7e255a087b4671d36a (patch) | |
| tree | e8a936b0eb9360156b0f4c50590ca497e4ede0a4 | |
| parent | ac90fbf4d815accf8c3e0c3c355ca6643dcabce9 (diff) | |
| download | bootstrap-321190535f09b41683589c7e255a087b4671d36a.tar.xz bootstrap-321190535f09b41683589c7e255a087b4671d36a.zip | |
Update mixins.less
Add a the function .make-small-column. See also http://stackoverflow.com/a/17308128/1596547
| -rw-r--r-- | less/mixins.less | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/less/mixins.less b/less/mixins.less index 879836a8c..78574b368 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -474,7 +474,21 @@ } } - +// Generate the small columns +.make-small-column(@columns) { + position: relative; + float: left; + // 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); + @max : (@grid-float-breakpoint - 1 ); + // Calculate width based on number of columns available + @media (max-width: @max) { + width: percentage((@columns / @grid-columns)); + } +} // Framework mixins // -------------------------------------------------- |
