Style table of contents

This commit is contained in:
Helen Chong 2024-04-13 17:25:14 +08:00
parent f3880aa31e
commit 31579f4d52
1 changed files with 20 additions and 47 deletions

View File

@ -470,39 +470,40 @@ article, .content-container {
} }
/* Article Table of Contents */ /* Article Table of Contents */
.toc { .toc__wrapper {
background-color: var(--clr-quote-bg); position: sticky;
max-width: max-content; top: 4rem;
padding: 1rem 1.3rem 0.3rem 1.3rem;
margin-top: 1rem;
outline: 1px solid var(--clr-title-border);
position: relative;
border-radius: 0.4rem;
} }
.toc-heading { .toc__heading {
font-size: 1.1rem; font-size: 1.3rem;
font-weight: 700; font-weight: 700;
margin-bottom: 0.5rem; color: var(--clr-sub-heading);
margin-right: 2rem;
cursor: pointer; cursor: pointer;
} }
.toc ol,
.toc ol ol {
display: grid;
gap: 0.3em;
}
.toc ol { .toc ol {
border-top: 1px solid var(--clr-title-border); border-top: 0.1em solid var(--clr-title-border);
padding: 0.8em 0 0 1em; padding-left: 1.5em;
line-height: 1.8; padding-top: 1em;
} }
.toc ol ol { .toc ol ol {
border-top: none;
list-style-type: disc; list-style-type: disc;
line-height: 1.5; padding-left: 1.5em;
padding-left: 1em; padding-top: 0.3em;
} }
.toc a { .toc ol a {
font-size: 1.1rem; font-size: 1.1rem;
padding-left: 0.4rem; padding-left: 0.3em;
} }
.toc ol ol a { .toc ol ol a {
@ -510,34 +511,6 @@ article, .content-container {
font-size: 1rem; font-size: 1rem;
} }
/* Sidebar Table of Contents */
.sidebar__toc {
position: sticky;
top: 4rem;
}
.sidebar__toc--title {
font-size: 1.3rem;
font-weight: bold;
}
.sidebar__toc ol {
list-style: none;
margin-left: 0;
padding-left: 0;
font-size: 1rem;
}
.sidebar__toc ol li {
margin-bottom: 0.5em;
}
.sidebar__toc ol ol {
padding-top: 0.5em;
padding-left: 1.25rem;
list-style-type: disc;
}
/* Pride flag backgrounds */ /* Pride flag backgrounds */
.flag-ace { .flag-ace {
background: repeating-linear-gradient( background: repeating-linear-gradient(