Adjust article and content child element spacings

This commit is contained in:
Helen Chong 2024-04-15 12:55:40 +08:00
parent 2cf0f1583e
commit a07f58f1a5
1 changed files with 21 additions and 12 deletions

View File

@ -143,10 +143,6 @@ h2 {
font-size: 1.7rem; font-size: 1.7rem;
} }
p {
padding: 0.5rem 0;
}
hr { hr {
border: 0.05rem solid var(--clr-title-border); border: 0.05rem solid var(--clr-title-border);
} }
@ -177,10 +173,10 @@ a:focus img {
} }
blockquote { blockquote {
margin: 1.5rem 0; padding: 0.7em 1.4em;
padding: 0.5rem 1rem; border-inline-start: 0.1em solid var(--clr-main-heading);
border-inline-start: 0.1rem solid var(--clr-main-heading);
background-color: var(--clr-quote-bg); background-color: var(--clr-quote-bg);
margin-bottom: 1em;
} }
button:hover { button:hover {
@ -293,15 +289,23 @@ main {
.article__info { .article__info {
text-align: center; text-align: center;
display: grid; display: grid;
gap: 0.2em;
} }
.article__info p {
padding: 0.1em 0; .content h2, .article h2,
.content h3, .article h3 {
margin-bottom: 0.5em;
} }
.sidebar--sticky { .content p,
position: sticky; .article p {
top: 5rem; line-height: 1.6;
}
.content p:not(:last-child),
.article p:not(:last-child) {
padding-bottom: 1em;
} }
.left-sidebar, .left-sidebar,
@ -309,6 +313,11 @@ main {
font-size: 0.9rem; font-size: 0.9rem;
} }
.sidebar--sticky {
position: sticky;
top: 5rem;
}
/* Desktop main content layout */ /* Desktop main content layout */
@media only screen and (min-width: 60rem) { @media only screen and (min-width: 60rem) {
.content__wrapper { .content__wrapper {