Responsive dropdown-menu-right class
Created by: niftylettuce
It'd be great if we could have responsive control over the dropdown menu opening either left or right aligned (as opposed to writing custom CSS).
Here's a quick demo of what the following sass does:
// since .dropdown-menu-right is not responsive
// we need to make sure that the language dropdown
// is right aligned on < md screen sizes
// <https://github.com/twbs/bootstrap/blob/34d745540d690086cdfc4ce648963f9acdc56bdb/scss/_navbar.scss#L160-L163>
#navbar-dropdown-language-ul {
right: 0;
left: auto; // Reset the default from `.dropdown-menu`
}
@include media-breakpoint-up(md) {
#navbar-dropdown-language-ul {
left: 0;
right: auto; // Reset the default from `.dropdown-menu`
}
}
Not sure if it should be called dropdown-menu-right-$size-up
or dropdown-menu-right-$size-down
?
Thoughts @mdo?