fixed dropdowns and dropups

This commit is contained in:
FezVrasta 2016-08-04 12:10:14 +02:00
parent 6e0dff00b8
commit 948b43bda6

View File

@ -13,6 +13,20 @@
transform-origin: 100% 0; transform-origin: 100% 0;
} }
@mixin menu-top-left {
top: 100%;
left: 0;
top: auto;
bottom: 100%;
transform-origin: 0 100%;
}
@mixin menu-top-right {
right: 0;
left: auto;
transform-origin: 100% 100%;
}
.dropdown-menu { .dropdown-menu {
display: block; // utilize transition transform instead of flipping display display: block; // utilize transition transform instead of flipping display
padding: .25rem 0; padding: .25rem 0;
@ -45,19 +59,16 @@
@include menu-bottom-right(); @include menu-bottom-right();
} }
//&.dropdown-menu-top-left { .dropup > & {
// top: auto; @include menu-top-right();
// bottom: 0; // needs to be overridden with the toggle-button height, see bmd-btn-icon above
// transform-origin: 0 100%; &.dropdown-menu-left {
//} @include menu-top-left();
// }
//&.dropdown-menu-top-right { &.dropdown-menu-right {
// top: auto; @include menu-top-right();
// right: 0; }
// bottom: 0; // needs to be overridden with the toggle-button height, see bmd-btn-icon above }
// left: auto;
// transform-origin: 100% 100%;
//}
// https://www.google.com/design/spec/components/menus.html#menus-specs // https://www.google.com/design/spec/components/menus.html#menus-specs
.dropdown-item { .dropdown-item {
@ -92,7 +103,6 @@
// this could be in a .btn-group or .dropdown // this could be in a .btn-group or .dropdown
.dropdown-toggle { .dropdown-toggle {
&.bmd-btn-icon, &.bmd-btn-icon,
&.bmd-btn-fab { &.bmd-btn-fab {
// remove the dropdown icon // remove the dropdown icon