aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-06-23 15:05:50 -0700
committerMark Otto <[email protected]>2013-06-23 15:05:50 -0700
commitb76d98eee3fa4a1a8d7fb281a31a7d20982459d3 (patch)
tree275b35774d7d23c563ab17b1b0c1b1ae7c010b0e
parent2a47037ab0d4aa644f04499bd704a85561b58e73 (diff)
downloadbootstrap-b76d98eee3fa4a1a8d7fb281a31a7d20982459d3.tar.xz
bootstrap-b76d98eee3fa4a1a8d7fb281a31a7d20982459d3.zip
Fixes #8211: restore proper table grid class behavior
Needs work though—we shouldn't be setting this stuff with the attribute selectors, but it's the easiest solution for now.
-rw-r--r--less/grid.less46
-rw-r--r--less/tables.less8
2 files changed, 47 insertions, 7 deletions
diff --git a/less/grid.less b/less/grid.less
index b97d1d5c4..e8082d369 100644
--- a/less/grid.less
+++ b/less/grid.less
@@ -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
@@ -68,6 +64,20 @@
//
// 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)); }
@@ -87,6 +97,20 @@
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)); }
@@ -144,6 +168,20 @@
.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)); }
diff --git a/less/tables.less b/less/tables.less
index fa5fd554b..88481a944 100644
--- a/less/tables.less
+++ b/less/tables.less
@@ -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