From 7e257894f2875f8cc9a888d53848d57d5ac0fc7e Mon Sep 17 00:00:00 2001 From: nevfy Date: Sun, 4 Feb 2024 23:09:40 +0400 Subject: [PATCH] fix: use sass nesting --- assets/scss/_styles_project.scss | 92 ++++-------------------------- assets/scss/docsy_overrides.scss | 98 +++++++++++++++++++++++--------- 2 files changed, 80 insertions(+), 110 deletions(-) diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index 5276f65..2713c20 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -1,72 +1,5 @@ @import "docsy_overrides"; -.sp-footer a.nav-link span { - width: 2rem; - display: inline-flex; - align-items: center; - border-radius: .1rem; - padding: .5rem; -} - -.sp-footer span i { - margin: auto; -} - -.nav-item { - margin-right: .5rem !important; -} - -.dropdown-menu { - right: 0; - left: unset; - padding: 0px; - box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25); -} - -.dropdown-item { - padding: 0.5rem 1.5rem; - border-radius: 0.25rem; -} - -.td-sidebar-nav .td-sidebar-link__page, -ul.ul-2>.td-sidebar-nav__section-title a { - color: #616161 !important; - font-weight: 400; -} - -ul.ul-2>.td-sidebar-nav__section-title a:hover { - color: $blue !important; -} - -li:has(input[type="checkbox"]) { - list-style-type: none; -} - - .td-toc ul { - margin-top: 1rem; -} - -.td-toc li { - display: block; - padding-bottom: .5rem; -} - -.td-toc a{ - display: inline !important; -} - -@media (min-width: 768px) { - .td-sidebar { - padding-top: 5rem; - } - .td-404 main, .td-main main { - padding-top: 6.5rem; - } - .td-sidebar-toc { - padding-top: 2.75rem; - } -} - .rounded-img { border-radius: 1rem; } @@ -84,10 +17,6 @@ li:has(input[type="checkbox"]) { padding-top: 0.8rem; } -.btn { - font-weight: 600; -} - .sp-feature-title { font-weight: 600; } @@ -97,23 +26,26 @@ li:has(input[type="checkbox"]) { font-weight: 600; padding: 0.3rem 0; color: $navbar-dark-color; - &:hover { color: $navbar-dark-hover-color; } - &:active { color: $navbar-dark-active-color; } - &:disabled { color: $navbar-dark-disabled-color; } + span { + width: 2rem; + display: inline-flex; + align-items: center; + border-radius: .1rem; + padding: .5rem; + } + } + span i { + margin: auto; } -} - -.text-secondary { - font-weight: 600; } .sp-service-icon { @@ -135,10 +67,6 @@ li:has(input[type="checkbox"]) { margin-top: 6rem; } -.tab-content .tab-pane { - max-width: 100% !important; -} - .sp-supperted-by-img { max-height: 5rem; margin: 1rem; diff --git a/assets/scss/docsy_overrides.scss b/assets/scss/docsy_overrides.scss index 85820d2..c682641 100644 --- a/assets/scss/docsy_overrides.scss +++ b/assets/scss/docsy_overrides.scss @@ -39,36 +39,78 @@ ul.ul-2>.td-sidebar-nav__section-title a:hover { color: $blue !important; } -.td-toc ul { - margin-top: 1rem; - } - - .td-toc li { - display: block; - padding-bottom: .5rem; - } - - .td-toc a{ - display: inline !important; - } +.td-toc { + ul { + margin-top: 1rem; + } + li { + display: block; + padding-bottom: .5rem; + } + a { + display: inline !important; + } +} - .tab-content .tab-pane { - border: 1px solid rgba(0, 0, 0, 0.125) !important; - border-radius: 0px .25rem .25rem .25rem; - } - - .nav-tabs { +.tab-content { + .tab-pane { + border: 1px solid rgba(0, 0, 0, 0.125) !important; + border-radius: 0px .25rem .25rem .25rem; + } + ul li, ol li { + margin-bottom: unset !important; + } + div { + transition: none; + } + .tab-pane { + max-width: 100% !important; + } +} + +.nav-tabs { border: none !important; - } + a:not(.active).nav-link:hover { + background-color: #0d6efd11; + } +} + +.nav-item { + margin-right: .5rem !important; +} - .nav-tabs a:not(.active).nav-link:hover { - background-color: #0d6efd11; - } +.dropdown-menu { + right: 0; + left: unset; + padding: 0px; + box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25); +} - .td-content ul li, .td-content ol li { - margin-bottom: unset !important; - } +.dropdown-item { + padding: 0.5rem 1.5rem; + border-radius: 0.25rem; +} - .tab-content div { - transition: none; - } \ No newline at end of file +li:has(input[type="checkbox"]) { + list-style-type: none; +} + +.btn { + font-weight: 600; +} + +.text-secondary { + font-weight: 600; +} + +@media (min-width: 768px) { + .td-sidebar { + padding-top: 5rem; + } + .td-404 main, .td-main main { + padding-top: 6.5rem; + } + .td-sidebar-toc { + padding-top: 2.75rem; + } +} \ No newline at end of file