From 3f2be51aa8a488a12dc55d81d2d2db3f23f3b502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Thu, 14 Sep 2023 14:36:05 +0200 Subject: [PATCH] Add Solaris icons for light/dark mode (#2237) --- site/assets/scss/_navbar.scss | 16 ++++++++++++++ site/layouts/_default/examples.html | 30 ++++++++++++++++++-------- site/layouts/partials/docs-navbar.html | 4 ++-- site/layouts/partials/icons.html | 15 ++++++------- 4 files changed, 46 insertions(+), 19 deletions(-) diff --git a/site/assets/scss/_navbar.scss b/site/assets/scss/_navbar.scss index 8decf4e8f8..5792538cf1 100644 --- a/site/assets/scss/_navbar.scss +++ b/site/assets/scss/_navbar.scss @@ -1,4 +1,6 @@ .bd-navbar { + --bd-navbar-dropdown-item-icon-size: 1.25rem; // Boosted mod + // Boosted mod: no padding // Boosted mod: no background-color // Boosted mod: no box-shadow @@ -20,6 +22,11 @@ &.active { color: var(--bs-link-hover-color); } + + .bi { + width: var(--bd-navbar-dropdown-item-icon-size); + height: var(--bd-navbar-dropdown-item-icon-size); + } } // End mod @@ -36,6 +43,15 @@ --bs-dropdown-line-height: #{$line-height-sm}; --bs-dropdown-item-padding-y: #{$dropdown-item-padding-y + .0625rem}; + .dropdown-item { + height: 2.5rem; + } + + .bi { + width: var(--bd-navbar-dropdown-item-icon-size); + height: var(--bd-navbar-dropdown-item-icon-size); + } + .active .bi { display: block !important; // stylelint-disable-line declaration-no-important } diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html index de61a041c7..82b2a96ddc 100644 --- a/site/layouts/_default/examples.html +++ b/site/layouts/_default/examples.html @@ -76,8 +76,21 @@ /* Boosted mod: no `.btn-bd-primary` custom style */ .bd-mode-toggle { + --bd-mode-toggle-icon-size: 1.25rem; /* Boosted mod */ z-index: 1500; } + + .bd-mode-toggle .dropdown-menu .active .bi { + display: block !important; + } + + /* Boosted mod */ + .bd-mode-toggle .dropdown-item .bi, + #bd-theme .bi { + width: var(--bd-mode-toggle-icon-size); + height: var(--bd-mode-toggle-icon-size); + } + /* End mod */ {{ range .Page.Params.extra_css }} @@ -87,18 +100,17 @@ - - + + - - - + + - - + + @@ -115,14 +127,14 @@