1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-29 16:19:53 +02:00

Add dropdown responsive alignment (#26255)

This commit is contained in:
ysds
2018-10-21 17:01:22 +09:00
committed by XhmikosR
parent 6bae9ef786
commit becb6ce346
2 changed files with 58 additions and 3 deletions

View File

@@ -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)