From 5d36ce3ce35fba10575db8218da0f4d234ffc8ca Mon Sep 17 00:00:00 2001 From: Vinicius Reis Date: Mon, 14 Mar 2022 20:20:32 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20(#114):=20add=20table=20css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinicius Reis --- css/prosemirror.scss | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/css/prosemirror.scss b/css/prosemirror.scss index 9b0f2ac9d93..b5680aee17c 100644 --- a/css/prosemirror.scss +++ b/css/prosemirror.scss @@ -252,6 +252,35 @@ div.ProseMirror { } } + // TODO: create new css variables to improve the theming capability. + table { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + table-layout: fixed; + white-space: normal; // force text to wrapping + + td, th { + border: 1px solid var(--color-border); + color: var(--color-main-text); + padding: 0.5em 0.75em; + vertical-align: top; + max-width: 100%; + } + thead tr { + background-color: var(--color-background-darker); + th { + font-weight: bold; + border-color: var(--color-border-dark); + } + } + tbody tr { + background-color: var(--color-main-background); + &:hover, &:active, &:focus { + background-color: var(--color-background-dark); + } + } + } } .ProseMirror-focused .ProseMirror-gapcursor {