Browse Source

Add max height only to select dropdown, max-height breaks overflow for menus inside menus

pull/1177/head
jlukic 10 years ago
parent
commit
334e46c6f9
1 changed files with 23 additions and 31 deletions
  1. 54
      src/definitions/modules/dropdown.less

54
src/definitions/modules/dropdown.less

@ -56,10 +56,6 @@
background: @menuBackground; background: @menuBackground;
min-width: 100%; min-width: 100%;
overflow-y: auto;
backface-visibility: hidden;
-webkit-overflow-scrolling: touch;
white-space: @menuWrap; white-space: @menuWrap;
font-size: 1rem; font-size: 1rem;
text-shadow: none; text-shadow: none;
@ -73,32 +69,6 @@
will-change: transform, opacity; will-change: transform, opacity;
} }
/*--------------
Responsive
---------------*/
@media only screen and (max-width : @largestMobileScreen) {
.ui.dropdown .menu {
max-height: @mobileMaxMenuHeight;
}
}
@media only screen and (min-width: @tabletBreakpoint) {
.ui.dropdown .menu {
max-height: @tabletMaxMenuHeight;
}
}
@media only screen and (min-width: @computerBreakpoint) {
.ui.dropdown .menu {
max-height: @computerMaxMenuHeight;
}
}
@media only screen and (min-width: @widescreenMonitorBreakpoint) {
.ui.dropdown .menu {
max-height: @widescreenMaxMenuHeight;
}
}
/*-------------- /*--------------
Hidden Input Hidden Input
---------------*/ ---------------*/
@ -362,7 +332,6 @@ select.ui.dropdown {
min-width: ~"calc(100% + 2px)"; min-width: ~"calc(100% + 2px)";
outline: none; outline: none;
max-height: @selectionMenuMaxHeight;
box-shadow: @selectionMenuBoxShadow; box-shadow: @selectionMenuBoxShadow;
transition: @selectionMenuTransition; transition: @selectionMenuTransition;
} }
@ -370,6 +339,29 @@ select.ui.dropdown {
.ui.selection.dropdown .menu:before { .ui.selection.dropdown .menu:before {
display: none; display: none;
} }
@media only screen and (max-width : @largestMobileScreen) {
.ui.selection.dropdown .menu {
max-height: @selectionMobileMaxMenuHeight;
}
}
@media only screen and (min-width: @tabletBreakpoint) {
.ui.selection.dropdown .menu {
max-height: @selectionTabletMaxMenuHeight;
}
}
@media only screen and (min-width: @computerBreakpoint) {
.ui.selection.dropdown .menu {
max-height: @selectionComputerMaxMenuHeight;
}
}
@media only screen and (min-width: @widescreenMonitorBreakpoint) {
.ui.selection.dropdown .menu {
max-height: @selectionWidescreenMaxMenuHeight;
}
}
/* Menu Item */
.ui.selection.dropdown .menu > .item { .ui.selection.dropdown .menu > .item {
border-top: @selectionItemDivider; border-top: @selectionItemDivider;
padding-left: @selectionHorizontalPadding !important; padding-left: @selectionHorizontalPadding !important;

Loading…
Cancel
Save