From df4ff89c6d058e1d862538df3b92a7cc3d25a5f3 Mon Sep 17 00:00:00 2001 From: CJ Patoilo Date: Mon, 22 Jul 2019 21:50:51 -0300 Subject: [PATCH] Improve the table component --- src/_Table.sass | 73 ++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/src/_Table.sass b/src/_Table.sass index f999743..e24624d 100644 --- a/src/_Table.sass +++ b/src/_Table.sass @@ -4,56 +4,49 @@ table border-spacing: 0 + display: flex width: 100% +thead + border-right: .1rem solid $color-quinary + +tbody + display: flex + overflow-x: auto + white-space: nowrap + +tr + border-right: .1rem solid $color-quinary + + &:last-child + border-right: 0 + td, th - border-bottom: .1rem solid $color-quinary + display: block padding: 1.2rem 1.5rem text-align: left - &:first-child - padding-left: 0 +@media (min-width: 40.0rem) - &:last-child - padding-right: 0 + table + display: table -@media screen and (max-width: 40.0rem) - table - border-spacing: 0 - display: flex - width: 100% + thead + border-right: 0 + overflow-x: visible + white-space: normal - thead - border-right: solid .1rem $color-quinary + tbody + display: table-row-group - td, - th - padding-left: 0 + tr + border-right: 0 - &:first-child - padding-left: 0 + &:last-child td + border-bottom: 0 - &:last-child - padding-right: 1.2rem - - tbody - display: flex - overflow-x: auto - white-space: nowrap - - tr - border-right: solid .1rem $color-quinary - - &:last-child - border-right: none - - td, - th - display: block - - &:first-child - padding-left: 1.2rem - - &:last-child - padding-right: 1.2rem + td, + th + border-bottom: .1rem solid $color-quinary + display: table-cell