Skip to content

Commit a75330c

Browse files
authored
v4: Dropdown units (#20701)
* Fixes #19784: Move from pixels to rems, add a margin-bottom: 0; to keep things aligned * lintiong
1 parent ebc77f6 commit a75330c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

scss/_dropdown.scss

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
.dropdown-header {
142142
display: block;
143143
padding: $dropdown-padding-y $dropdown-item-padding-x;
144+
margin-bottom: 0; // for use with heading elements
144145
font-size: $font-size-sm;
145146
color: $dropdown-header-color;
146147
white-space: nowrap; // as with > li > a

scss/_variables.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -437,14 +437,14 @@ $form-icon-danger: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www
437437
//
438438
// Dropdown menu container and contents.
439439

440-
$dropdown-min-width: 160px !default;
441-
$dropdown-padding-y: 5px !default;
442-
$dropdown-margin-top: 2px !default;
440+
$dropdown-min-width: 10rem !default;
441+
$dropdown-padding-y: .5rem !default;
442+
$dropdown-margin-top: .125rem !default;
443443
$dropdown-bg: #fff !default;
444444
$dropdown-border-color: rgba(0,0,0,.15) !default;
445445
$dropdown-border-width: $border-width !default;
446446
$dropdown-divider-bg: #e5e5e5 !default;
447-
$dropdown-box-shadow: 0 6px 12px rgba(0,0,0,.175) !default;
447+
$dropdown-box-shadow: 0 .5rem 1rem rgba(0,0,0,.175) !default;
448448

449449
$dropdown-link-color: $gray-dark !default;
450450
$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
@@ -455,7 +455,7 @@ $dropdown-link-active-bg: $component-active-bg !default;
455455

456456
$dropdown-link-disabled-color: $gray-light !default;
457457

458-
$dropdown-item-padding-x: 20px !default;
458+
$dropdown-item-padding-x: 1.5rem !default;
459459

460460
$dropdown-header-color: $gray-light !default;
461461

0 commit comments

Comments
 (0)