From 558c0c84ee166f2db8a45e0013dc9577ba322b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20N=C3=BCsse?= Date: Tue, 2 Aug 2022 10:27:32 +0200 Subject: Update table style --- src/components/EditorMarkdownIt.vue | 40 ++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/src/components/EditorMarkdownIt.vue b/src/components/EditorMarkdownIt.vue index 340fac7d..aba20cbe 100644 --- a/src/components/EditorMarkdownIt.vue +++ b/src/components/EditorMarkdownIt.vue @@ -178,18 +178,6 @@ export default { color: var(--color-text-light) } - & table th { - font-weight: bold; - } - - & table td, & table th { - padding-right: 1.5em; - } - - & table td:empty::after { - content: '\00a0'; - } - .task-list-item { list-style-type: none; input { @@ -231,5 +219,33 @@ export default { margin-bottom: 5px; } + & table { + width: calc(100% - 50px); + table-layout: auto; + margin-top: 2em; + margin-bottom: 2em; + border-radius: 0.5em; + border-collapse: collapse; + border-style: hidden; + box-shadow: 0 0 0 1px var(--color-border); + } + + & table td, & table th { + padding: 0.35em 0.5em; + text-align: left; + border: 1px solid var(--color-border); + } + + & table tr:hover { + background-color: var(--color-primary-element-lighter); + } + + & table th { + font-weight: bold; + } + + & table td:empty::after { + content: '\00a0'; + } } -- cgit v1.2.3