From 6978d8c5d46fd24f2843bff1a15a556d773702d2 Mon Sep 17 00:00:00 2001 From: dominikcrha Date: Wed, 2 Aug 2023 14:22:27 +0200 Subject: [PATCH] Removed specific dark theme defaults in favour of css vars that change automatically --- .../HxSidebar_Documentation.razor | 8 +++--- .../wwwroot/defaults.css | 25 ++++++------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/Havit.Blazor.Components.Web.Bootstrap.Documentation/Pages/Components/HxSidebarDoc/HxSidebar_Documentation.razor b/Havit.Blazor.Components.Web.Bootstrap.Documentation/Pages/Components/HxSidebarDoc/HxSidebar_Documentation.razor index 11a943e31..8b1ac4b0b 100644 --- a/Havit.Blazor.Components.Web.Bootstrap.Documentation/Pages/Components/HxSidebarDoc/HxSidebar_Documentation.razor +++ b/Havit.Blazor.Components.Web.Bootstrap.Documentation/Pages/Components/HxSidebarDoc/HxSidebar_Documentation.razor @@ -52,10 +52,10 @@ Toggler border. - + Toggler background. - + Toggler color. @@ -64,7 +64,7 @@ Padding of the items. - + Color of the items. @@ -130,7 +130,7 @@ Height of the brand logo. - + Color of the brand name. diff --git a/Havit.Blazor.Components.Web.Bootstrap/wwwroot/defaults.css b/Havit.Blazor.Components.Web.Bootstrap/wwwroot/defaults.css index 309579e2f..59cfbae4c 100644 --- a/Havit.Blazor.Components.Web.Bootstrap/wwwroot/defaults.css +++ b/Havit.Blazor.Components.Web.Bootstrap/wwwroot/defaults.css @@ -14,11 +14,11 @@ --hx-sidebar-collapsed-width: 72px; --hx-sidebar-width: 250px; --hx-sidebar-toggler-border: 1px solid var(--bs-border-color); - --hx-sidebar-toggler-background: var(--bs-white); - --hx-sidebar-toggler-color: var(--bs-dark); + --hx-sidebar-toggler-background: var(--bs-body-bg); + --hx-sidebar-toggler-color: var(--bs-body-color); --hx-sidebar-item-font-size: 1rem; --hx-sidebar-item-padding: .75rem; - --hx-sidebar-item-color: var(--bs-dark); + --hx-sidebar-item-color: var(--bs-body-color); --hx-sidebar-item-hover-color: var(--bs-primary); --hx-sidebar-item-hover-background-color: var(--bs-primary-rgb); --hx-sidebar-item-hover-background-opacity: .05; @@ -39,7 +39,7 @@ --hx-sidebar-brand-shortname-border-radius: .625rem; --hx-sidebar-brand-shortname-color: var(--bs-white); --hx-sidebar-brand-shortname-font-weight: 600; - --hx-sidebar-brand-name-color: var(--bs-dark); + --hx-sidebar-brand-name-color: var(--bs-body-color); --hx-sidebar-brand-name-font-weight: 600; --hx-sidebar-footer-padding: 1rem; --hx-sidebar-footer-item-padding: .75rem; @@ -151,7 +151,7 @@ --hx-tree-view-item-border-width: 0; --hx-tree-view-item-border-style: unset; --hx-tree-view-item-border-color: unset; - --hx-tree-view-item-color: var(--bs-dark); + --hx-tree-view-item-color: var(--bs-bg-color); --hx-tree-view-item-hover-color: var(--bs-primary); --hx-tree-view-item-selected-color: var(--bs-primary); --hx-tree-view-item-background: transparent; @@ -185,19 +185,10 @@ --hx-search-box-dropdown-menu-height: 300px; } -[data-bs-theme=dark] { - --hx-sidebar-brand-name-color: var(--bs-light); - --hx-sidebar-item-color: var(--bs-light); - --hx-sidebar-toggler-color: var(--bs-light); - --hx-sidebar-toggler-background: var(--bs-dark); - - --hx-tree-view-item-color: var(--bs-light); -} - form { - display: flex; - flex-direction: column; - gap: var(--hx-form-spacing); + display: flex; + flex-direction: column; + gap: var(--hx-form-spacing); } form > .hx-button {