From 1d7f25bd2e1982784633a4da655b7634e29eecb3 Mon Sep 17 00:00:00 2001 From: Alexander Dimitrov Date: Thu, 22 Aug 2024 16:37:05 +0300 Subject: [PATCH 1/2] remove nesting from css --- src/css/global-footer.css | 10 ++++----- src/css/toc.css | 44 +++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/css/global-footer.css b/src/css/global-footer.css index 4e4b470..1f1788e 100644 --- a/src/css/global-footer.css +++ b/src/css/global-footer.css @@ -1,12 +1,12 @@ .footer { padding-inline: 0; border-top: 2px solid var(--ifm-color-secondary-lightest); +} - & > .container { - padding: 0; - margin: 0; - max-width: 100%; - } +.footer > .container { + padding: 0; + margin: 0; + max-width: 100%; } .footer-about { diff --git a/src/css/toc.css b/src/css/toc.css index a5cbf7b..8f187f1 100644 --- a/src/css/toc.css +++ b/src/css/toc.css @@ -1,32 +1,32 @@ .table-of-contents { border-left: none; +} - & li { - margin: 0 0.25rem 0 0; +.table-of-contents li { + margin: 0 0.25rem 0 0; +} - & ul { - margin-left: 0.75rem; - } - } +.table-of-contents li ul { + margin-left: 0.75rem; +} - & a { - padding: var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal); - text-decoration: none; - border-radius: .5rem; +.table-of-contents a { + padding: var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal); + text-decoration: none; + border-radius: .5rem; - &:hover { - color: var(--ifm-color-primary); - text-decoration: underline; - } + .table-of-contents:hover { + color: var(--ifm-color-primary); + text-decoration: underline; } +} - & .table-of-contents__link--active { - outline: 1px solid #ddd; - box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1); - font-weight: 700; - } +.table-of-contents .table-of-contents__link--active { + outline: 1px solid #ddd; + box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1); + font-weight: 700; +} - & code { - font-size: inherit; - } +.table-of-contents code { + font-size: inherit; } From b77330846bc56e7314626bd085572d4386bc199b Mon Sep 17 00:00:00 2001 From: Alexander Dimitrov Date: Thu, 22 Aug 2024 16:38:46 +0300 Subject: [PATCH 2/2] fix incorrect nest --- src/css/toc.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/css/toc.css b/src/css/toc.css index 8f187f1..450d1fc 100644 --- a/src/css/toc.css +++ b/src/css/toc.css @@ -14,11 +14,11 @@ padding: var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal); text-decoration: none; border-radius: .5rem; +} - .table-of-contents:hover { - color: var(--ifm-color-primary); - text-decoration: underline; - } +.table-of-contents:hover { + color: var(--ifm-color-primary); + text-decoration: underline; } .table-of-contents .table-of-contents__link--active {