From db3c88e487efe2a9c93206bd2e8ad89f5eb3dc09 Mon Sep 17 00:00:00 2001 From: thest1tch Date: Tue, 3 Oct 2023 15:27:07 +0500 Subject: [PATCH] add style github for table --- docs/stylesheets/extra.css | 31 +++++++++++++++++++++++++++++++ mkdocs.yml | 5 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 docs/stylesheets/extra.css diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 0000000..47e33d0 --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,31 @@ +th, td { + border: 1px solid var(--md-typeset-table-color); + border-spacing: 0; + border-bottom: none; + border-left: none; + border-top: none; +} + +.md-typeset__table { + line-height: 1; +} + +.md-typeset__table table:not([class]) { + font-size: .74rem; + border-right: none; +} + +.md-typeset__table table:not([class]) td, +.md-typeset__table table:not([class]) th { + padding: 9px; +} + +/* light mode alternating table bg colors */ +.md-typeset__table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +/* dark mode alternating table bg colors */ +[data-md-color-scheme="slate"] .md-typeset__table tr:nth-child(2n) { + background-color: hsla(var(--md-hue),25%,25%,1) +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 00f6077..a633cb0 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -255,4 +255,7 @@ extra: link: https://discord.gg/xtsgTBf analytics: provider: google - property: G-E6GYT2D13K \ No newline at end of file + property: G-E6GYT2D13K + +extra_css: + - stylesheets/extra.css \ No newline at end of file