From 4c8f7a9bb5a11ba82e4ab513393fc63b2cf71b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Thu, 14 Sep 2023 12:09:30 +0200 Subject: [PATCH] . --- scss/helpers/_icon-link.scss | 6 ++---- site/assets/scss/_navbar.scss | 16 +++++++++++++--- site/layouts/_default/examples.html | 17 +++++++++++++++-- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/scss/helpers/_icon-link.scss b/scss/helpers/_icon-link.scss index 80e8581001..10613f8f38 100644 --- a/scss/helpers/_icon-link.scss +++ b/scss/helpers/_icon-link.scss @@ -9,11 +9,9 @@ backface-visibility: hidden; > .bi { - --test-icon-size: 30px; - flex-shrink: 0; - width: var(--test-icon-size); - height: var(--test-icon-size); + width: $icon-link-icon-size; + height: $icon-link-icon-size; fill: currentcolor; @include transition($icon-link-icon-transition); } diff --git a/site/assets/scss/_navbar.scss b/site/assets/scss/_navbar.scss index c5f4cfc216..b758aa87cf 100644 --- a/site/assets/scss/_navbar.scss +++ b/site/assets/scss/_navbar.scss @@ -1,4 +1,6 @@ .bd-navbar { + --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(--icon-size) !important; // stylelint-disable-line declaration-no-important + height: var(--icon-size) !important; // stylelint-disable-line declaration-no-important + } } // End mod @@ -36,10 +43,13 @@ --bs-dropdown-line-height: #{$line-height-sm}; --bs-dropdown-item-padding-y: #{$dropdown-item-padding-y + .0625rem}; + .dropdown-item { + height: 2.5rem; + } + .bi { - --test-icon-size: 40px; - width: var(--test-icon-size) !important; // stylelint-disable-line declaration-no-important - height: var(--test-icon-size) !important; // stylelint-disable-line declaration-no-important + width: var(--icon-size) !important; // stylelint-disable-line declaration-no-important + height: var(--icon-size) !important; // stylelint-disable-line declaration-no-important } .active .bi { diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html index 52a4499331..f9b0b1e89d 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) !important; + height: var(--bd-mode-toggle-icon-size) !important; + } + /* End mod */ {{ range .Page.Params.extra_css }} @@ -87,8 +100,8 @@ - - + +