diff --git a/lib/css/components/tables.less b/lib/css/components/tables.less index 5500af65de..1f9e552ffc 100644 --- a/lib/css/components/tables.less +++ b/lib/css/components/tables.less @@ -20,6 +20,7 @@ // - Totals row // - Sortable tables // • TABLE CELL SIZES +// • TABLE BORDER WITH SIZES ON ZOOM // // ============================================================================ @@ -41,13 +42,11 @@ border-collapse: collapse; border-spacing: 0; font-size: var(--fs-body1); - + border: 0.01px solid var(--bc-medium); // Using 0.01 is workaround for border-with calculation, because the Browser will fallback to at least 1px th, td { padding: var(--su8); - border-top: 1px solid var(--bc-medium); - border-left: 1px solid var(--bc-medium); - border-right: 1px solid var(--bc-medium); + border-left: 0.01px solid var(--bc-medium); vertical-align: middle; color: var(--fc-medium); text-align: left; @@ -66,6 +65,11 @@ color: var(--fc-dark); } + tr { + border-bottom: 0.01px solid var(--bc-medium); + position: initial; + } + // Custom styles when in a table head thead th { vertical-align: bottom; @@ -78,17 +82,6 @@ tbody th { font-weight: normal; } - - // If it's the last row, add a bottom border - tr:last-of-type td, - tr:last-of-type th { - border-bottom: 1px solid var(--bc-medium); - } - - // If two table bodies are next to each other, visually separate them - tbody + tbody { - border-top: var(--su-static2) solid var(--bc-medium); - } } // ============================================================================ @@ -196,13 +189,12 @@ // ------------------------------------------------------------------------ // -- No Borders &.s-table__b0 { - th, + border: 0; + tr, td, - tr:last-of-type th, - tr:last-of-type td { - border-color: transparent; + th { + border: none } - // Clear Header Styles thead th { background-color: transparent; @@ -210,57 +202,36 @@ font-size: inherit; letter-spacing: initial; } - - // This makes the border transparent, so we need to use whitespace - // to achieve the same effect a 2px gray border achieves. - tbody + tbody { - border-color: transparent; - border-width: var(--su-static12); - } } // -- Horizontal Only with Table Outline &.s-table__bx { - tr { - > *:not(:first-child) { - border-left-color: transparent; - } - > *:not(:last-child) { - border-right-color: transparent; - } + th, + td { + border-left: none } } // -- Horizontal Only without Table Outline &.s-table__bx-simple { + border: 0; + tr { + &:last-of-type { + border-bottom: 0; + } + } th, td { - border-left-color: transparent; - border-right-color: transparent; + border: none; } thead th { - border-top-color: transparent; - border-bottom-color: var(--bc-darker); + border-bottom: 0.01px solid var(--bc-darker); // Clear Header Styles background-color: transparent; text-transform: initial; font-size: inherit; letter-spacing: initial; } - tbody tr { - &:first-of-type th, - &:first-of-type td { - border-top-color: transparent; - } - &:last-of-type th, - &:last-of-type td { - border-bottom-color: transparent; - } - } - tfoot th, - tfoot td { - border-bottom-color: transparent; - } } // $$ TOTALS ROW @@ -294,7 +265,6 @@ // $$ Progress Bar // ------------------------------------------------------------------------ td.s-table--progress { - border-right: none; text-align: right; } @@ -302,16 +272,21 @@ border-left: none; padding-left: 0; width: 120px; + box-shadow: none; } // $$ Disabled rows // ------------------------------------------------------------------------ tr.is-disabled { - background-color: var(--black-025); + th, + td { + background-color: var(--black-025); + + } th:not(.is-enabled), td:not(.is-enabled) { - opacity: calc(var(--_o-disabled) * 0.6); // 0.5 * 0.6 = 0.3 + color: var(--black-150); } } } @@ -335,3 +310,24 @@ .s-table--cell10 { width: @table-columns * 10; } .s-table--cell11 { width: @table-columns * 11; } .s-table--cell12 { width: @table-columns * 12; } + +// ============================================================================ +// $ TABLE BORDER WITH SIZES ON ZOOM +// ============================================================================ +@media (min-resolution: 120dpi) { + table, th, td { + border-width: 0.75px; + } + } + + @media (min-resolution: 144dpi) { + table, th, td { + border-width: 0.666px; + } + } + + @media (min-resolution: 192dpi) { + table, th, td { + border-width: 0.5px; + } + } \ No newline at end of file