Skip to content

Commit

Permalink
fix(dropdowns): add and trim CSS vars (#1423)
Browse files Browse the repository at this point in the history
* Add "Boosted" mod comments in docs
* Add `--#{$prefix}dropdown-zindex:`
* Drop unused `-#{$prefix}dropdown-padding-x`
* Fix some links between CSS and Scss vars
  • Loading branch information
louismaximepiton authored Aug 30, 2022
1 parent d025921 commit 71e331b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions scss/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
.bg-dark &:not(.dropdown-toggle-split),
.navbar-dark &:not(.dropdown-toggle-split) {
// scss-docs-start dropdown-toggle-dark-variant-css-vars
--#{$prefix}dropdown-toggle-color: #{$dropdown-bg};
--#{$prefix}dropdown-toggle-bg: #{$dropdown-color};
--#{$prefix}dropdown-toggle-border-color: #{$gray-700};
--#{$prefix}dropdown-toggle-border-hover-color: #{$dropdown-link-hover-color};
--#{$prefix}dropdown-toggle-color: #{$dropdown-bg}; // Boosted mod
--#{$prefix}dropdown-toggle-bg: #{$dropdown-color}; // Boosted mod
--#{$prefix}dropdown-toggle-border-color: #{$gray-700}; // Boosted mod
--#{$prefix}dropdown-toggle-border-hover-color: #{$dropdown-link-hover-color}; // Boosted mod
// scss-docs-end dropdown-toggle-dark-variant-css-vars

color: var(--#{$prefix}dropdown-toggle-color);
Expand All @@ -43,7 +43,7 @@
}

.btn-group &:not(.btn-inverse) {
border-color: var(--#{$prefix}dropdown-toggle-color); // Boosted mod
border-color: var(--#{$prefix}dropdown-toggle-color);
}
// End mod

Expand All @@ -54,8 +54,9 @@
// The dropdown menu
.dropdown-menu {
// scss-docs-start dropdown-css-vars
--#{$prefix}dropdown-zindex: #{$zindex-dropdown}; // Boosted mod
--#{$prefix}dropdown-min-width: #{$dropdown-min-width};
--#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
// Boosted mod: no --#{$prefix}dropdown-padding-x
--#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
--#{$prefix}dropdown-spacer: #{$dropdown-spacer};
@include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size);
Expand Down Expand Up @@ -83,7 +84,7 @@
// scss-docs-end dropdown-css-vars

position: absolute;
z-index: $zindex-dropdown;
z-index: var(--#{$prefix}dropdown-zindex); // Boosted mod
display: none; // none by default, but block on "open" of the menu
min-width: var(--#{$prefix}dropdown-min-width);
padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-y);
Expand Down Expand Up @@ -195,7 +196,7 @@
height: 0;
margin: var(--#{$prefix}dropdown-divider-margin-y) 0;
overflow: hidden;
border-top: $border-width solid var(--#{$prefix}dropdown-divider-bg); // Boosted mod
border-top: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-divider-bg); // Boosted mod
opacity: 1; // Revisit in v6 to de-dupe styles that conflict with <hr> element
}

Expand Down

0 comments on commit 71e331b

Please sign in to comment.