Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorysds <fellows3@gmail.com>2018-10-21 11:01:22 +0300
committerXhmikosR <xhmikosr@gmail.com>2018-10-21 11:01:22 +0300
commitbecb6ce346a69fccccb1828e289ae4e4d3af8535 (patch)
tree71690ab7fa90b33626393e06c3e4cae5727ee7ce /scss/_dropdown.scss
parent6bae9ef7866e0bf037229bb369e07d6aeabd934c (diff)
Add dropdown responsive alignment (#26255)
Diffstat (limited to 'scss/_dropdown.scss')
-rw-r--r--scss/_dropdown.scss23
1 files changed, 20 insertions, 3 deletions
diff --git a/scss/_dropdown.scss b/scss/_dropdown.scss
index b6a4089d4b..3ec5a34e4c 100644
--- a/scss/_dropdown.scss
+++ b/scss/_dropdown.scss
@@ -33,9 +33,26 @@
@include box-shadow($dropdown-box-shadow);
}
-.dropdown-menu-right {
- right: 0;
- left: auto;
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ .dropdown-menu#{$infix}-right {
+ right: 0;
+ left: auto;
+ }
+ }
+}
+
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ .dropdown-menu#{$infix}-left {
+ right: auto;
+ left: 0;
+ }
+ }
}
// Allow for dropdowns to go bottom up (aka, dropup-menu)