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;
min-width: 100%;
overflow-y: auto;
backface-visibility: hidden;
-webkit-overflow-scrolling: touch;
white-space: @menuWrap;
font-size: 1rem;
text-shadow: none;
@ -73,32 +69,6 @@
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
---------------*/
@ -362,7 +332,6 @@ select.ui.dropdown {
min-width: ~"calc(100% + 2px)";
outline: none;
max-height: @selectionMenuMaxHeight;
box-shadow: @selectionMenuBoxShadow;
transition: @selectionMenuTransition;
}
@ -370,6 +339,29 @@ select.ui.dropdown {
.ui.selection.dropdown .menu:before {
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 {
border-top: @selectionItemDivider;
padding-left: @selectionHorizontalPadding !important;

Loading…
Cancel
Save