trwnh.com/unified.test.hugo/assets/styles/components/table-of-contents.scss

56 lines
1 KiB
SCSS
Raw Normal View History

.table-of-contents {
&__title {
margin-block-start: 1em;
margin-block-end: 0.5em;
font-weight: 900;
text-transform: uppercase;
font-size: 1rem;
&:before {
content: '' !important; // if autonumbering is enabled, remove it from the heading
counter-reset: h2 // and don't increment the count for the rest of the content
}
}
2024-10-05 06:27:07 +00:00
ul, ol {
list-style: none;
margin: 0;
padding: 0;
}
li {
margin-block: 0.5em;
margin-inline: 0;
line-height: 1.5;
2024-10-05 06:27:07 +00:00
}
a {
display: inline;
2024-10-05 06:27:07 +00:00
}
li > ul, li > ol { /* indent subheadings */
margin-inline-start: 1em;
}
}
// the shortcode version can't be overridden for some reason...
#TableOfContents:not(.table-of-contents) {
ul, ol {
list-style: none;
margin: 0;
padding: 0;
}
li {
margin-block: 0.5em;
margin-inline: 0;
line-height: 1.5;
}
a {
display: inline;
}
li > ul, li > ol { /* indent subheadings */
margin-inline-start: 1em;
}
}
// hide toc shortcode if page-wide toc is enabled
*[has-toc] {
#TableOfContents:not(.table-of-contents) {
display: none;
}
2024-10-05 06:27:07 +00:00
}