Skip to content

Commit

Permalink
Add --qd-block-margin theme property
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgio committed Aug 11, 2024
1 parent cf0526d commit 17d19a0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
24 changes: 24 additions & 0 deletions core/src/main/resources/render/theme/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
--qd-main-font: inherit;
--qd-main-font-size: 1em;
--qd-heading-font: inherit;
--qd-block-margin: 32px;

/* Reveal properties are inherited */
--r-background-color: var(--qd-background-color);
Expand All @@ -14,6 +15,7 @@
--r-main-font: var(--qd-main-font);
--r-main-font-size: var(--qd-main-font-size);
--r-heading-font: var(--qd-heading-font);
--r-block-margin: var(--qd-block-margin);
}

body {
Expand All @@ -25,21 +27,36 @@ body {

hr {
width: 100%;
margin-top: var(--qd-block-margin);
margin-bottom: var(--qd-block-margin);
}

figure {
text-align: center;
margin-top: var(--qd-block-margin);
margin-bottom: var(--qd-block-margin);
}

h1, h2, h3, h4, h5, h6 {
font-family: var(--qd-heading-font);
text-transform: none !important;
margin-top: var(--qd-block-margin);
margin-bottom: var(--qd-block-margin);
}

table {
margin-top: var(--qd-block-margin);
margin-bottom: var(--qd-block-margin);
}

a {
color: var(--qd-link-color);
}

code.focus-lines .hljs-ln-line:not(.focused) {
opacity: 0.4;
}

.align {
width: 100%;
display: flex;
Expand Down Expand Up @@ -68,6 +85,11 @@ a {
display: flex;
}

.stack:not(.stack .stack) {
margin-top: var(--qd-block-margin);
margin-bottom: var(--qd-block-margin);
}

.stack-horizontal {
flex-direction: row;
}
Expand Down Expand Up @@ -96,6 +118,8 @@ a {

.box {
width: 100%;
margin-top: var(--qd-block-margin);
margin-bottom: var(--qd-block-margin);
}

.box > header p {
Expand Down
7 changes: 1 addition & 6 deletions core/src/main/resources/render/theme/layout/beamer.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
--reveal-center-vertically: false;
--qd-main-font: "Source Sans Pro", sans-serif;
--qd-heading-font: "Fira Sans", sans-serif;
--qd-block-margin: 32px;
}

.reveal .slides > section {
Expand Down Expand Up @@ -39,7 +40,6 @@ ol, ul {
}

table {
margin: auto;
border-collapse: collapse;
border-spacing: 0;
}
Expand All @@ -59,12 +59,7 @@ table tr:last-child td {
border-bottom: none;
}

code.focus-lines .hljs-ln-line:not(.focused) {
opacity: 0.4;
}

.box {
margin: 12px;
border-radius: 8px;
}

Expand Down
7 changes: 1 addition & 6 deletions core/src/main/resources/render/theme/layout/minimal.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
:root {
--qd-main-font: "Lato", sans-serif;
--qd-heading-font: "Inter", sans-serif;

--r-block-margin: 36px;
--qd-block-margin: 1.8em;
}

h1 {
Expand Down Expand Up @@ -37,8 +36,6 @@ ol, ul {
}

table {
margin-top: 32px !important;
margin-bottom: 32px !important;
border-spacing: 0;
border-collapse: collapse;
}
Expand Down Expand Up @@ -70,8 +67,6 @@ table tr th:last-child {

.box {
border-radius: 8px;
margin-top: 32px;
margin-bottom: 32px;
}

.box > header {
Expand Down

0 comments on commit 17d19a0

Please sign in to comment.