From 15be9d3277184375d0bd0874e94195d4b4d54026 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 21 Dec 2018 20:59:40 -0800 Subject: [PATCH] Add variable for dropdown-divider-margin-y (#27857) * Add variable for dropdown-divider-margin-y For us to reassign the nav-divider-margin-y variable here, we have to rearrange some of the variables. Fixes #26660. * bump bundlesize --- package.json | 2 +- scss/_dropdown.scss | 2 +- scss/_variables.scss | 61 ++++++++++++++++++++++---------------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 6fafbb4337..599ae7198f 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ }, { "path": "./dist/css/bootstrap.min.css", - "maxSize": "22.5 kB" + "maxSize": "22.7 kB" }, { "path": "./dist/js/bootstrap.bundle.js", diff --git a/scss/_dropdown.scss b/scss/_dropdown.scss index 93c1d78e95..c6907c8a8c 100644 --- a/scss/_dropdown.scss +++ b/scss/_dropdown.scss @@ -118,7 +118,7 @@ // Dividers (basically an `
`) within the dropdown .dropdown-divider { - @include nav-divider($dropdown-divider-bg); + @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y); } // Links, buttons, and more within the dropdown menu diff --git a/scss/_variables.scss b/scss/_variables.scss index dbeab65f36..26a2df81d6 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -655,36 +655,6 @@ $form-feedback-icon-invalid-color: $form-feedback-invalid-color !default; $form-feedback-icon-invalid: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='#{$form-feedback-icon-invalid-color}' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"), "#", "%23") !default; -// Dropdowns -// -// Dropdown menu container and contents. - -$dropdown-min-width: 10rem !default; -$dropdown-padding-y: .5rem !default; -$dropdown-spacer: .125rem !default; -$dropdown-bg: $white !default; -$dropdown-border-color: rgba($black, .15) !default; -$dropdown-border-radius: $border-radius !default; -$dropdown-border-width: $border-width !default; -$dropdown-inner-border-radius: calc(#{$dropdown-border-radius} - #{$dropdown-border-width}) !default; -$dropdown-divider-bg: $gray-200 !default; -$dropdown-box-shadow: 0 .5rem 1rem rgba($black, .175) !default; - -$dropdown-link-color: $gray-900 !default; -$dropdown-link-hover-color: darken($gray-900, 5%) !default; -$dropdown-link-hover-bg: $gray-100 !default; - -$dropdown-link-active-color: $component-active-color !default; -$dropdown-link-active-bg: $component-active-bg !default; - -$dropdown-link-disabled-color: $gray-600 !default; - -$dropdown-item-padding-y: .25rem !default; -$dropdown-item-padding-x: 1.5rem !default; - -$dropdown-header-color: $gray-600 !default; - - // Z-index master list // // Warning: Avoid customizing these values. They're used for a bird's eye view @@ -759,6 +729,37 @@ $navbar-dark-brand-color: $navbar-dark-active-color !default; $navbar-dark-brand-hover-color: $navbar-dark-active-color !default; +// Dropdowns +// +// Dropdown menu container and contents. + +$dropdown-min-width: 10rem !default; +$dropdown-padding-y: .5rem !default; +$dropdown-spacer: .125rem !default; +$dropdown-bg: $white !default; +$dropdown-border-color: rgba($black, .15) !default; +$dropdown-border-radius: $border-radius !default; +$dropdown-border-width: $border-width !default; +$dropdown-inner-border-radius: calc(#{$dropdown-border-radius} - #{$dropdown-border-width}) !default; +$dropdown-divider-bg: $gray-200 !default; +$dropdown-divider-margin-y: $nav-divider-margin-y !default; +$dropdown-box-shadow: 0 .5rem 1rem rgba($black, .175) !default; + +$dropdown-link-color: $gray-900 !default; +$dropdown-link-hover-color: darken($gray-900, 5%) !default; +$dropdown-link-hover-bg: $gray-100 !default; + +$dropdown-link-active-color: $component-active-color !default; +$dropdown-link-active-bg: $component-active-bg !default; + +$dropdown-link-disabled-color: $gray-600 !default; + +$dropdown-item-padding-y: .25rem !default; +$dropdown-item-padding-x: 1.5rem !default; + +$dropdown-header-color: $gray-600 !default; + + // Pagination $pagination-padding-y: .5rem !default;