From 9fb8e5787f57f4c975c23e689873668cb4fd3017 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Fri, 30 Jul 2021 09:54:33 +0200 Subject: [PATCH] chore: make table a component --- src/scss/_drawing.scss | 2 ++ src/scss/_typography.scss | 34 ------------------------------- src/scss/components/_tables.scss | 35 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 34 deletions(-) create mode 100644 src/scss/components/_tables.scss diff --git a/src/scss/_drawing.scss b/src/scss/_drawing.scss index 6b041fb..e4dc1e4 100644 --- a/src/scss/_drawing.scss +++ b/src/scss/_drawing.scss @@ -9,6 +9,8 @@ @import 'components/cards'; +@import 'components/tables'; + @import 'components/previews'; .flex-that { diff --git a/src/scss/_typography.scss b/src/scss/_typography.scss index f73fbaa..f0525fc 100644 --- a/src/scss/_typography.scss +++ b/src/scss/_typography.scss @@ -289,37 +289,3 @@ mark { width: 100%; display: block; } - -/* Table elements */ - -@mixin table-color($text-color) { - th { - color: $text-color; - } -} - -table { - border-collapse: collapse; -} - -table, th, td { - border: 0; - padding:0px; - margin:0px; -} - -th, td { - vertical-align:center; - padding-top: 0.325em; - padding-bottom: 0.325em; -} - -th { - font-weight: $fontweight_hyper; -} - -.table { - @each $name, $color in list-colors() { - &-#{$name} { @include table-color(get-color($name)); } - } -} diff --git a/src/scss/components/_tables.scss b/src/scss/components/_tables.scss new file mode 100644 index 0000000..4bc5079 --- /dev/null +++ b/src/scss/components/_tables.scss @@ -0,0 +1,35 @@ +/* TABLE + * Style tables +*/ + +@mixin table-color($text-color) { + th { + color: $text-color; + } +} + +table { + border-collapse: collapse; +} + +table, th, td { + border: 0; + padding:0px; + margin:0px; +} + +th, td { + vertical-align:center; + padding-top: 0.325em; + padding-bottom: 0.325em; +} + +th { + font-weight: $fontweight_hyper; +} + +.table { + @each $name, $color in list-colors() { + &-#{$name} { @include table-color(get-color($name)); } + } +}