]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Update mixins.less 8302/head
authorBass Jobsen <bass@w3masters.nl>
Tue, 25 Jun 2013 23:05:45 +0000 (01:05 +0200)
committerBass Jobsen <bass@w3masters.nl>
Tue, 25 Jun 2013 23:05:45 +0000 (01:05 +0200)
Add a the function .make-small-column. See also http://stackoverflow.com/a/17308128/1596547

less/mixins.less

index 879836a8c6f258ed5ba7776821a74de085ecdc88..78574b3682e07ea55aae2e657dcb36414eb622dd 100644 (file)
   }
 }
 
-
+// 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
 // --------------------------------------------------