aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBass Jobsen <[email protected]>2013-06-26 01:05:45 +0200
committerBass Jobsen <[email protected]>2013-06-26 01:05:45 +0200
commit321190535f09b41683589c7e255a087b4671d36a (patch)
treee8a936b0eb9360156b0f4c50590ca497e4ede0a4
parentac90fbf4d815accf8c3e0c3c355ca6643dcabce9 (diff)
downloadbootstrap-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.less16
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
// --------------------------------------------------