From 6ae4c9d9167e70d99b25ca8306b50a124817e2f9 Mon Sep 17 00:00:00 2001 From: Marco 'Lubber' Wienkoop Date: Thu, 2 Feb 2023 07:14:37 +0100 Subject: [PATCH] fix(dropdown): compact menu items were cut Whenever a compact selection dropdown has got large menu items and a shorter menu item was selected, the whole dropdown menu was shrinked to the selected item width which in turn cropped all other items when the menu was opened again This PR make sure by default the items text is not cropped and shown in one line. In case somebody wants to wrap item text by whitespace one could add multiline to the menu node. --- src/definitions/collections/menu.less | 5 ++--- src/definitions/modules/dropdown.less | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/definitions/collections/menu.less b/src/definitions/collections/menu.less index 7c0669738b..8a8c408cd9 100755 --- a/src/definitions/collections/menu.less +++ b/src/definitions/collections/menu.less @@ -1,9 +1,8 @@ -/* - * # Fomantic - Menu +/*! + * # Fomantic-UI - Menu * https://github.com/fomantic/Fomantic-UI/ * * - * Copyright 2015 Contributor * Released under the MIT license * https://opensource.org/licenses/MIT * diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less index 0cc311f521..984ed8b728 100755 --- a/src/definitions/modules/dropdown.less +++ b/src/definitions/modules/dropdown.less @@ -425,6 +425,12 @@ select.ui.dropdown { /* Compact */ .ui.compact.selection.dropdown { min-width: 0; + & > .menu { + width: auto; + } + &:not(.multiline) { + width: max-content; + } } }