Skip to content

Commit

Permalink
Fix wrong line height of second line of paragraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgio committed Oct 6, 2024
1 parent fe79542 commit d8b4b03
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
20 changes: 15 additions & 5 deletions core/src/main/resources/render/theme/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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]) {
Expand Down Expand Up @@ -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 */
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/resources/render/theme/layout/beamer.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ blockquote {
font-style: italic;
opacity: 0.7;
background: none !important;
padding-left: 0;
padding-right: 0;
}

blockquote[class] {
Expand Down
7 changes: 6 additions & 1 deletion core/src/main/resources/render/theme/layout/minimal.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions demo/demo.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Export your Quarkdown project as:
a plain document.

.fragment
.whitespace

*...in just one line, within your code.*

.row gap:{5mm}
Expand Down

0 comments on commit d8b4b03

Please sign in to comment.