From ad90d99299b228384e0bfe95c74bd070994d6921 Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Sat, 25 Mar 2023 14:08:15 +0800 Subject: [PATCH] style: markdown table --- src/main.css | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/main.css b/src/main.css index f2f9d72..b8301c9 100644 --- a/src/main.css +++ b/src/main.css @@ -27,6 +27,42 @@ height: 100%; } + .markdown table { + --tw-border-spacing-x: 0px; + --tw-border-spacing-y: 0px; + border-collapse: separate; + border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y); + width: 100%; + } + .markdown th { + background-color: rgba(236, 236, 241, 0.2); + border-bottom-width: 1px; + border-left-width: 1px; + border-top-width: 1px; + padding: 0.25rem 0.75rem; + } + .markdown th:first-child { + border-top-left-radius: 0.375rem; + } + .markdown th:last-child { + border-right-width: 1px; + border-top-right-radius: 0.375rem; + } + .markdown td { + border-bottom-width: 1px; + border-left-width: 1px; + padding: 0.25rem 0.75rem; + } + .markdown td:last-child { + border-right-width: 1px; + } + .markdown tbody tr:last-child td:first-child { + border-bottom-left-radius: 0.375rem; + } + .markdown tbody tr:last-child td:last-child { + border-bottom-right-radius: 0.375rem; + } + img { @apply inline-block; }