lib/assets/stylesheets/uniform/components/table.scss in uniform-ui-2.4.1 vs lib/assets/stylesheets/uniform/components/table.scss in uniform-ui-3.0.0.beta2

- old
+ new

@@ -1,161 +1,54 @@ -@include size-rules('.table'){ - display:table; - width:100%; - & > *, - .row > *{ - display:table-cell; - float:none; - &.-top{ - vertical-align:top; - } - &.-middle > *{ - vertical-align:middle; - } - } - .row{ - display:table-row; - } -} -.cell-top{ - vertical-align: top; - td, th{ - vertical-align: top; - } -} +@include responsive-rule('.layout-fixed'){ table-layout: fixed;} -.cell-middle{ - vertical-align: middle; - td, th{ - vertical-align: middle; - } -} - .uniformTable{ width:100%; - .row > *, - tr td, + + td, th { padding: 0.5em; - border-bottom: 1px solid color('gray-light'); } - &.tight{ - .row > *, - tr td, - th { - padding: 0.2em 0.5em; + tr + tr { + td, + th{ + border-top-width: 1px; } } - &.tight-more{ - .row > *, - tr td, - th { - padding: 0 0.5em; + &.-snug{ + td, + th, + .table-cell { + padding: 0.2em 0.5em; } } - &.no-pad{ - .row > *, - tr td, - th { - padding-left: 0; - padding-right: 0; + &.-tight{ + td, + th, + .table-cell { + padding: 0 0.5em; } } - .head > *, - thead th{ - color: color('gray-dark'); - border-bottom: 1px solid color('gray'); - } - - .head.dark > *, - thead.dark th{ - background: lighten(color('background'), 2); - } - - tr.middle > td, - td.middle, - &.middle > *, - .middle{ - vertical-align:middle; - } - - tr.bottom > td, - td.bottom, - &.bottom > *, - .bottom{ - vertical-align:bottom; - } - - tr.top > td, - td.top, - &.top > *, - .top{ - vertical-align:top; - } - - &.hover{ - tr:hover td{ - background: lighten(color('blue'), 50); + &.-striped{ + tr:nth-child(2n+1){ + background-color: transparent; } } - .row:last-of-type, - tr:last-of-type{ - td, th{ - border-bottom: none; + //---------------------------------------------------------------- + // Head + //---------------------------------------------------------------- + thead{ + tr:last-child{ + border-bottom-width: 1px; } } - &.invert{ - .row > *, - td, th{ - border-bottom-color: color('gray-dark'); - } - } -} - -.uniformTableDotLeaders{ - line-height: 1; - table-layout: fixed; - & > * > td, - & > * > * > td, - & > * > th, - & > * > * > th{ - padding-top:0.3em; - padding-bottom: 0.3em; - vertical-align:bottom; - } - - & > * > td, - & > * > * > td{ - padding-left:0.5em; - } - - & > * > th, - & > * > * > th{ - background: icon-circle(6, 8, 1, color('gray')); - background-repeat: repeat-x; - background-position: left bottom; - span{ - background-color: white; - padding-right: 0.5em; - position: relative; - } - } - & > thead{ - & > * > th{ - background:none; - } - } - &.bg-background{ - & > * > th, - & > * > * > th{ - background-image:radial-gradient(black 1px, color('background') 0px); - span{ - background-color: color('background'); - } - } + + th{ + font-weight: bold; + text-transform: uppercase; + font-size: 0.8em; } }