From 68a2dcb81b45c4a909c6ff4a2f88b773d1794201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 22 Dec 2020 15:22:52 +0100 Subject: Make checkbox styling fit better with lists and a bit more compact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/prosemirror.scss | 48 ++++++++---------------------------------------- 1 file changed, 8 insertions(+), 40 deletions(-) (limited to 'css') diff --git a/css/prosemirror.scss b/css/prosemirror.scss index e1561b0a5..eb514866c 100644 --- a/css/prosemirror.scss +++ b/css/prosemirror.scss @@ -30,24 +30,17 @@ div.ProseMirror { display: flex; align-items: start; // Left-align with list item text - margin-left: -24px; + margin-left: -23px; input[type=checkbox] { display: none; } &:before { content: ''; - display: inline-block; - height: 14px; - width: 14px; vertical-align: middle; - border-radius: 50%; - margin: 2px 6px 3px 3px; + margin: 3px 6px 3px 2px; border: 1px solid var(--color-text-maxcontrast); - content: ""; position: relative; - width: 44px; - height: 44px; display: block; border-radius: var(--border-radius); height: 14px; @@ -65,40 +58,10 @@ div.ProseMirror { display: block; flex-grow: 1; max-width: calc(100% - 28px); - > *:first-child { - margin-top: 0; - } } } - li label.checkbox-label { - width: 100%; - display: flex; - margin-top: 10px; - margin-bottom: 1em; - - &:before { - position: relative; - top: 2px; - } - div.checkbox-wrapper { - margin-bottom: -1em; - width: 100%; - - & > p { - margin-top: -1px; - margin-bottom: 0; - padding-bottom: 10px; - } - } - } - p:first-child, - h1:first-child, - h2:first-child, - h3:first-child, - h4:first-child, - h5:first-child, - h6:first-child { + > *:first-child { margin-top: 10px; } @@ -193,6 +156,11 @@ div.ProseMirror { li { position: relative; + padding-left: 3px; + + p { + margin-bottom: 0.5em; + } } ul, ol { -- cgit v1.2.3