From d8b4b03bfa0d8a6d2f197f12dcdd0659eef700a2 Mon Sep 17 00:00:00 2001 From: Giorgio Garofalo Date: Sun, 6 Oct 2024 15:02:22 +0200 Subject: [PATCH] Fix wrong line height of second line of paragraphs --- .../main/resources/render/theme/global.css | 20 ++++++++++++++----- .../resources/render/theme/layout/beamer.css | 2 ++ .../resources/render/theme/layout/minimal.css | 7 ++++++- demo/demo.qmd | 2 ++ 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/core/src/main/resources/render/theme/global.css b/core/src/main/resources/render/theme/global.css index 46b67333..00b0ba4f 100644 --- a/core/src/main/resources/render/theme/global.css +++ b/core/src/main/resources/render/theme/global.css @@ -112,6 +112,18 @@ body:has(.pagedjs_page) { margin: 0 var(--qd-block-margin); } +/* Not loose. */ +li { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +/* Loose. */ +li:has(p) { + margin-top: 1em; + margin-bottom: 1em; +} + figure { text-align: center; } @@ -123,6 +135,7 @@ blockquote { blockquote, .reveal blockquote { color: var(--qd-quote-foreground-color); + padding: var(--qd-block-margin); } :is(blockquote, .reveal blockquote):not([class]) { @@ -213,11 +226,8 @@ h1, h2, h3, h4, h5, h6 { p, .reveal p { line-height: var(--qd-line-height); -} - -/* Line height is set only after the first line */ -:is(p, .reveal p)::first-line { - line-height: 1 !important; + margin-top: 0 !important; + margin-bottom: 0 !important; } /* Reset the margin of the first element in a page */ diff --git a/core/src/main/resources/render/theme/layout/beamer.css b/core/src/main/resources/render/theme/layout/beamer.css index f8d26a1f..746e6c64 100644 --- a/core/src/main/resources/render/theme/layout/beamer.css +++ b/core/src/main/resources/render/theme/layout/beamer.css @@ -66,6 +66,8 @@ blockquote { font-style: italic; opacity: 0.7; background: none !important; + padding-left: 0; + padding-right: 0; } blockquote[class] { diff --git a/core/src/main/resources/render/theme/layout/minimal.css b/core/src/main/resources/render/theme/layout/minimal.css index 281a261a..da982ccb 100644 --- a/core/src/main/resources/render/theme/layout/minimal.css +++ b/core/src/main/resources/render/theme/layout/minimal.css @@ -74,7 +74,8 @@ table tr th:last-child { blockquote { font-style: italic; border-left: 0.4em solid; - padding: 4px 1em; + padding-left: 1em; + padding-right: 1em; } figure img { @@ -149,6 +150,10 @@ nav li { border-color: inherit; } +.page-margin-bottom-center > p { + line-height: 1; +} + .page-margin-bottom-center > *:first-child { margin-left: 64px !important; } diff --git a/demo/demo.qmd b/demo/demo.qmd index 055296c6..291f00d7 100644 --- a/demo/demo.qmd +++ b/demo/demo.qmd @@ -38,6 +38,8 @@ Export your Quarkdown project as: a plain document. .fragment + .whitespace + *...in just one line, within your code.* .row gap:{5mm}