app/assets/stylesheets/bootstrap/tables.less in bootstrap-on-rails-0.0.2 vs app/assets/stylesheets/bootstrap/tables.less in bootstrap-on-rails-3.2.0

- old
+ new

@@ -2,11 +2,10 @@ // Tables // -------------------------------------------------- table { - max-width: 100%; background-color: @table-bg; } th { text-align: left; } @@ -14,10 +13,11 @@ // Baseline styles .table { width: 100%; + max-width: 100%; margin-bottom: @line-height-computed; // Cells > thead, > tbody, > tfoot { @@ -102,42 +102,48 @@ // Zebra-striping // // Default zebra-stripe styles (alternating gray and transparent backgrounds) -.table-striped > tbody > tr:nth-child(odd) { - > td, - > th { - background-color: @table-bg-accent; +.table-striped { + > tbody > tr:nth-child(odd) { + > td, + > th { + background-color: @table-bg-accent; + } } } // Hover effect // // Placed here since it has to come after the potential zebra striping -.table-hover > tbody > tr:hover { - > td, - > th { - background-color: @table-bg-hover; +.table-hover { + > tbody > tr:hover { + > td, + > th { + background-color: @table-bg-hover; + } } } // Table cell sizing // // Reset default table behavior table col[class*="col-"] { + position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) float: none; display: table-column; } table { td, th { &[class*="col-"] { + position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) float: none; display: table-cell; } } } @@ -146,38 +152,29 @@ // Table backgrounds // // Exact selectors below required to override `.table-striped` and prevent // inheritance to nested tables. -.table > thead > tr, -.table > tbody > tr, -.table > tfoot > tr { - > td.active, - > th.active, - &.active > td, - &.active > th { - background-color: @table-bg-active; - } -} - // Generate the contextual variants -.table-row-variant(success; @state-success-bg; @state-success-border); -.table-row-variant(danger; @state-danger-bg; @state-danger-border); -.table-row-variant(warning; @state-warning-bg; @state-warning-border); +.table-row-variant(active; @table-bg-active); +.table-row-variant(success; @state-success-bg); +.table-row-variant(info; @state-info-bg); +.table-row-variant(warning; @state-warning-bg); +.table-row-variant(danger; @state-danger-bg); // Responsive tables // // Wrap your tables in `.table-responsive` and we'll make them mobile friendly // by enabling horizontal scrolling. Only applies <768px. Everything above that // will display normally. -@media (max-width: @screen-xs-max) { - .table-responsive { +.table-responsive { + @media screen and (max-width: @screen-xs-max) { width: 100%; margin-bottom: (@line-height-computed * 0.75); overflow-y: hidden; - overflow-x: scroll; + overflow-x: auto; -ms-overflow-style: -ms-autohiding-scrollbar; border: 1px solid @table-border-color; -webkit-overflow-scrolling: touch; // Tighten up spacing