diff --git a/packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css b/packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css index f2a5ca300db..10ba58514e2 100644 --- a/packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css +++ b/packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css @@ -3,14 +3,20 @@ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ +:root { + --ck-toolbar-dropdown-max-width: 60vw; +} + .ck.ck-toolbar-dropdown { - & .ck.ck-toolbar .ck.ck-toolbar__items { - flex-wrap: nowrap; - } + & .ck-dropdown__panel { + /* https://github.com/ckeditor/ckeditor5/issues/5586 */ + width: max-content; + max-width: var(--ck-toolbar-dropdown-max-width); - & .ck-dropdown__panel .ck-button { - &:focus { - z-index: calc(var(--ck-z-default) + 1); + & .ck-button { + &:focus { + z-index: calc(var(--ck-z-default) + 1); + } } } }