From 5539a42b3015cb822ee86d03c1478c8845abd546 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 8 Aug 2021 16:47:58 +0200 Subject: [PATCH] fix(article): unordered TOC style (#292) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/283 --- assets/scss/partials/layout/article.scss | 37 ++++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index 4309039..1d22fb9 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -193,30 +193,34 @@ color: var(--card-text-color-main); #TableOfContents { - ol { - counter-reset: item; - list-style-type: none; - padding: 0; + ol, + ul { margin: 0; + padding: 0; } - & > li { - padding: 0; - margin: 0; + ol { + list-style-type: none; + counter-reset: item; + + li:before { + counter-increment: item; + content: counters(item, ".") ". "; + font-weight: bold; + margin-right: 5px; + } + } + + & > ul { + padding: 0 1em; } li { margin: 15px 20px; padding: 5px; - &::before { - counter-increment: item; - content: counters(item, ".") ". "; - font-weight: bold; - margin-right: 5px; - } - - & > ol { + & > ol, + & > ul { margin-top: 10px; padding-left: 10px; margin-bottom: -5px; @@ -385,7 +389,8 @@ padding-bottom: 56.25%; overflow: hidden; - & > iframe, & > video { + & > iframe, + & > video { position: absolute; width: 100%; height: 100%;