Set custom property for paragraph margin

This commit is contained in:
Helen Chong 2024-04-20 06:04:37 +08:00
parent fdcf1f5b27
commit 9bbb7bca8f
1 changed files with 17 additions and 3 deletions

View File

@ -33,6 +33,8 @@
--clr-main-footer-bg: #13092D; --clr-main-footer-bg: #13092D;
--ff-primary: 'Noto Sans'; --ff-primary: 'Noto Sans';
--ms-paragraph-margin: 1.15em;
} }
/* ------------------- */ /* ------------------- */
@ -197,7 +199,7 @@ blockquote {
} }
blockquote > * + :not([class]) { blockquote > * + :not([class]) {
margin-top: 1.15em; margin-top: var(--ms-paragraph-margin);
} }
button:hover { button:hover {
@ -290,7 +292,7 @@ main {
.content > * + :not([class]), .content > * + :not([class]),
.content__section > * + :not([class]), .content__section > * + :not([class]),
.article > * + :not([class]) { .article > * + :not([class]) {
margin-top: 1.15em; margin-top: var(--ms-paragraph-margin);
} }
.sidebar--sticky { .sidebar--sticky {
@ -355,6 +357,10 @@ main {
display: block; display: block;
} }
:not(.heading-wrapper) +.heading-wrapper {
margin-top: 1.7em;
}
/* SPECIAL ELEMENTS */ /* SPECIAL ELEMENTS */
.inline-code { .inline-code {
font-family: monospace; font-family: monospace;
@ -432,6 +438,10 @@ main {
} }
/* Spoiler Accordion */ /* Spoiler Accordion */
* + .spoiler-accordion {
margin-top: var(--ms-paragraph-margin);
}
.spoiler-accordion { .spoiler-accordion {
padding: 0.5em 0; padding: 0.5em 0;
} }
@ -441,7 +451,11 @@ main {
} }
.spoiler-accordion__spoiler { .spoiler-accordion__spoiler {
padding: 0 1rem; padding: 0.5em 1em;
}
.spoiler-accordion__spoiler p + p {
margin-top: 1em;
} }
/* Web button lists */ /* Web button lists */