From becb6ce346a69fccccb1828e289ae4e4d3af8535 Mon Sep 17 00:00:00 2001 From: ysds Date: Sun, 21 Oct 2018 17:01:22 +0900 Subject: Add dropdown responsive alignment (#26255) --- scss/_dropdown.scss | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'scss') diff --git a/scss/_dropdown.scss b/scss/_dropdown.scss index b6a4089d4..3ec5a34e4 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) -- cgit v1.2.3