From: Bass Jobsen Date: Tue, 25 Jun 2013 23:05:45 +0000 (+0200) Subject: Update mixins.less X-Git-Tag: v3.0.0-rc1~133^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=321190535f09b41683589c7e255a087b4671d36a;p=thirdparty%2Fbootstrap.git Update mixins.less Add a the function .make-small-column. See also http://stackoverflow.com/a/17308128/1596547 --- diff --git a/less/mixins.less b/less/mixins.less index 879836a8c6..78574b3682 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 // --------------------------------------------------