Skip to content

Commit

Permalink
Merge pull request #8553 from ckeditor/i/5586
Browse files Browse the repository at this point in the history
Fix (ui): A toolbar with grouped items should wrap to keep items visible in the viewport. Closes #5586 .
  • Loading branch information
oleq authored Dec 1, 2020
2 parents 8b16046 + c1d2fe0 commit 65bc73d
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}

0 comments on commit 65bc73d

Please sign in to comment.