Browse Source

Fix dropdown issues with min-width

pull/2237/head
Jack Lukic 9 years ago
parent
commit
cfe3b2ec56
2 changed files with 10 additions and 5 deletions
  1. 13
      src/definitions/modules/dropdown.less
  2. 2
      src/themes/default/modules/dropdown.variables

13
src/definitions/modules/dropdown.less

@ -27,7 +27,6 @@
cursor: pointer; cursor: pointer;
position: relative; position: relative;
display: inline-block; display: inline-block;
line-height: 1em;
tap-highlight-color: rgba(0, 0, 0, 0); tap-highlight-color: rgba(0, 0, 0, 0);
outline: none; outline: none;
text-align: left; text-align: left;
@ -49,14 +48,13 @@
display: none; display: none;
outline: none; outline: none;
top: 100%; top: 100%;
min-width: max-content;
transition: @menuTransition; transition: @menuTransition;
margin: @menuMargin; margin: @menuMargin;
padding: @menuPadding; padding: @menuPadding;
background: @menuBackground; background: @menuBackground;
min-width: 100%;
white-space: @menuWrap;
font-size: @relativeMedium; font-size: @relativeMedium;
text-shadow: none; text-shadow: none;
text-align: @menuTextAlign; text-align: @menuTextAlign;
@ -69,6 +67,11 @@
will-change: transform, opacity; will-change: transform, opacity;
} }
.ui.dropdown .menu > * {
white-space: nowrap;
}
/*-------------- /*--------------
Hidden Input Hidden Input
---------------*/ ---------------*/
@ -201,6 +204,7 @@
.ui.dropdown > .text > .description, .ui.dropdown > .text > .description,
.ui.dropdown .menu > .item > .description { .ui.dropdown .menu > .item > .description {
float: @itemDescriptionFloat;
margin: @itemDescriptionMargin; margin: @itemDescriptionMargin;
color: @itemDescriptionColor; color: @itemDescriptionColor;
} }
@ -340,6 +344,7 @@
.ui.selection.dropdown { .ui.selection.dropdown {
cursor: pointer; cursor: pointer;
word-wrap: break-word; word-wrap: break-word;
line-height: 1em;
white-space: normal; white-space: normal;
outline: 0; outline: 0;
transform: rotateZ(0deg); transform: rotateZ(0deg);
@ -394,9 +399,9 @@ select.ui.dropdown {
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
border-top-width: 0px !important; border-top-width: 0px !important;
width: auto; width: auto;
outline: none;
margin: 0px -@menuBorderWidth; margin: 0px -@menuBorderWidth;
min-width: @menuMinWidth; min-width: @menuMinWidth;
outline: none;
border-radius: @selectionMenuBorderRadius; border-radius: @selectionMenuBorderRadius;
box-shadow: @selectionMenuBoxShadow; box-shadow: @selectionMenuBoxShadow;

2
src/themes/default/modules/dropdown.variables

@ -28,7 +28,6 @@
@menuMargin: 0em; @menuMargin: 0em;
@menuPadding: 0em 0em; @menuPadding: 0em 0em;
@menuTop: 100%; @menuTop: 100%;
@menuWrap: normal;
@menuTextAlign: left; @menuTextAlign: left;
@menuBorderWidth: 1px; @menuBorderWidth: 1px;
@ -103,6 +102,7 @@
@itemDropdownIconMargin: @itemLineHeightOffset 0em 0em @itemDropdownIconDistance; @itemDropdownIconMargin: @itemLineHeightOffset 0em 0em @itemDropdownIconDistance;
/* Description */ /* Description */
@itemDescriptionFloat: right;
@itemDescriptionMargin: 0em 0em 0em 1em; @itemDescriptionMargin: 0em 0em 0em 1em;
@itemDescriptionColor: @lightTextColor; @itemDescriptionColor: @lightTextColor;

Loading…
Cancel
Save