From 684694b3e8344d3163bd2872aa086ea19bb3e6f7 Mon Sep 17 00:00:00 2001 From: Linwei Zhang Date: Sun, 17 Nov 2024 11:23:15 +0800 Subject: [PATCH] Add table style --- sass/_vars.scss | 4 +++- sass/elements/_table.scss | 18 ++++++++++++++++++ sass/site.scss | 4 ++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 sass/elements/_table.scss diff --git a/sass/_vars.scss b/sass/_vars.scss index 4f26dc7..78aaecd 100644 --- a/sass/_vars.scss +++ b/sass/_vars.scss @@ -1,8 +1,10 @@ // General $max-width: 800px; +$border-radius: 10px; // Colors $color-black: #000; $color-white: #ececec; $color-grey-800: #232326; -$color-grey-900: #1e1e22; \ No newline at end of file +$color-grey-900: #1e1e22; +$subtitle-color: #999; \ No newline at end of file diff --git a/sass/elements/_table.scss b/sass/elements/_table.scss new file mode 100644 index 0000000..9a47c5e --- /dev/null +++ b/sass/elements/_table.scss @@ -0,0 +1,18 @@ +table { + border-spacing: 0; + border: 2px solid $subtitle-color; + border-radius: $border-radius; +} + +thead { + background-color: $color-white; +} + +tr td { + padding: 0.5rem; + border-top: 2px solid $subtitle-color; +} + +tr td:last-child { + border-left: 2px solid $subtitle-color; +} \ No newline at end of file diff --git a/sass/site.scss b/sass/site.scss index 1be2e6d..642de34 100644 --- a/sass/site.scss +++ b/sass/site.scss @@ -2,6 +2,10 @@ @import 'vars'; +// Elements +// - HTML element tweaks: html, body, a, ul, li… +@import "elements/table"; + @import 'components/base'; @import 'components/header'; @import 'components/footer';