From afdc46af6e279a0b0321ecfc222d48ac74beeeac Mon Sep 17 00:00:00 2001 From: jlukic Date: Fri, 27 Mar 2015 12:05:50 -0400 Subject: [PATCH] Fixes #2024, simplifies padding logic for selection item --- src/definitions/modules/dropdown.less | 6 ++---- src/themes/default/globals/site.variables | 2 +- src/themes/default/modules/dropdown.variables | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less index ce6654ffa..87332a78e 100755 --- a/src/definitions/modules/dropdown.less +++ b/src/definitions/modules/dropdown.less @@ -400,7 +400,7 @@ select.ui.dropdown { /* Scrollbar in IE */ @media all and (-ms-high-contrast:none) { .ui.selection.dropdown .menu { - min-width: ~"calc(100% - "@scrollBarWidth~")"; + min-width: ~"calc(100% - "@scrollbarWidth~")"; } } @@ -428,9 +428,7 @@ select.ui.dropdown { /* Menu Item */ .ui.selection.dropdown .menu > .item { border-top: @selectionItemDivider; - padding-left: @selectionHorizontalPadding !important; - /* Add in spacing for scroll bar */ - padding-right: ~"calc("@selectionHorizontalPadding~" + 1em) !important~"; + padding: @selectionItemPadding !important; white-space: normal; word-wrap: normal; } diff --git a/src/themes/default/globals/site.variables b/src/themes/default/globals/site.variables index 2656c4510..813c37d94 100644 --- a/src/themes/default/globals/site.variables +++ b/src/themes/default/globals/site.variables @@ -375,7 +375,7 @@ --------------------*/ /* Rendered Scrollbar Width */ -@scrollBarWidth: 15px; +@scrollbarWidth: 15px; /* Used to match floats with text */ @lineHeightOffset : ((@lineHeight - 1em) / 2); diff --git a/src/themes/default/modules/dropdown.variables b/src/themes/default/modules/dropdown.variables index d92a37952..1d54695c3 100644 --- a/src/themes/default/modules/dropdown.variables +++ b/src/themes/default/modules/dropdown.variables @@ -143,6 +143,10 @@ @selectionMenuBoxShadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.08); @selectionMenuItemBoxShadow: none; +@selectionItemHorizontalPadding: @itemHorizontalPadding; +@selectionItemVerticalPadding: @itemVerticalPadding; +@selectionItemPadding: @selectionItemVerticalPadding @selectionItemHorizontalPadding; + @selectionTransition: @transition, box-shadow 0.2s @defaultEasing,