]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fixes #8211: restore proper table grid class behavior
authorMark Otto <otto@github.com>
Sun, 23 Jun 2013 22:05:50 +0000 (15:05 -0700)
committerMark Otto <otto@github.com>
Sun, 23 Jun 2013 22:05:50 +0000 (15:05 -0700)
Needs work though—we shouldn't be setting this stuff with the attribute
selectors, but it's the easiest solution for now.

less/grid.less
less/tables.less

index b97d1d5c4a6b3da09b1b7ef609bce31dcea44033..e8082d369580d3fb4bbb187dc7b0a569f0a9b1f9 100644 (file)
@@ -2,7 +2,6 @@
 // Grid system
 // --------------------------------------------------
 
-
 // Set the container width, and override it for fixed navbars in media queries
 .container {
   .container-fixed();
@@ -51,9 +50,6 @@
 .col-lg-11,
 .col-lg-12 {
   position: relative;
-  // Float and set width: 100%; for easy stacking on mobile devices
-  float: left;
-  width: 100%;
   // Prevent columns from collapsing when empty
   min-height: 1px;
   // Inner gutter via padding
 //
 
 // Tiny device columns (smartphones)
+.col-1,
+.col-2,
+.col-3,
+.col-4,
+.col-5,
+.col-6,
+.col-7,
+.col-8,
+.col-9,
+.col-10,
+.col-11,
+.col-12 {
+  float: left;
+}
 .col-1  { width: percentage((1 / @grid-columns)); }
 .col-2  { width: percentage((2 / @grid-columns)); }
 .col-3  { width: percentage((3 / @grid-columns)); }
     max-width: @container-tablet;
   }
 
+  .col-sm-1,
+  .col-sm-2,
+  .col-sm-3,
+  .col-sm-4,
+  .col-sm-5,
+  .col-sm-6,
+  .col-sm-7,
+  .col-sm-8,
+  .col-sm-9,
+  .col-sm-10,
+  .col-sm-11,
+  .col-sm-12 {
+    float: left;
+  }
   .col-sm-1  { width: percentage((1 / @grid-columns)); }
   .col-sm-2  { width: percentage((2 / @grid-columns)); }
   .col-sm-3  { width: percentage((3 / @grid-columns)); }
   .container {
     max-width: @container-desktop;
   }
+  .col-lg-1,
+  .col-lg-2,
+  .col-lg-3,
+  .col-lg-4,
+  .col-lg-5,
+  .col-lg-6,
+  .col-lg-7,
+  .col-lg-8,
+  .col-lg-9,
+  .col-lg-10,
+  .col-lg-11,
+  .col-lg-12 {
+    float: left;
+  }
   .col-lg-1  { width: percentage((1 / @grid-columns)); }
   .col-lg-2  { width: percentage((2 / @grid-columns)); }
   .col-lg-3  { width: percentage((3 / @grid-columns)); }
index fa5fd554b22b38ca7b90a33728ddc39b79569a5d..88481a9444c87430ecc066b997e1a150c9337a7c 100644 (file)
@@ -184,16 +184,18 @@ th {
 // -----------------
 
 // Reset default table behavior
-table col[class*="col-span-"] {
+table col[class^="col-"] {
   float: none;
   display: table-column;
 }
-table td[class*="col-span-"],
-table th[class*="col-span-"] {
+table td[class^="col-"],
+table th[class^="col-"] {
   float: none;
   display: table-cell;
 }
 
+
+
 // TABLE BACKGROUNDS
 // -----------------
 // Exact selectors below required to override .table-striped