From 334e46c6f9073229a67fd136ad39d54fce977340 Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 9 Oct 2014 00:42:21 -0400 Subject: [PATCH] Add max height only to select dropdown, max-height breaks overflow for menus inside menus --- src/definitions/modules/dropdown.less | 54 ++++++++++++--------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less index fb6f125a4..0c6cff226 100755 --- a/src/definitions/modules/dropdown.less +++ b/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;