8
0
Просмотр исходного кода

Merge pull request #186 from ckeditor/t/ckeditor5/952

Fix: The `DropdownPanelView` should scroll when the content is long. Added a CSS custom property to control the height of the panel. Closes ckeditor/ckeditor5#952.
Aleksander Nowodzinski 7 лет назад
Родитель
Сommit
288743d82b

+ 5 - 0
packages/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css

@@ -9,6 +9,7 @@
 
 :root {
 	--ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));
+	--ck-dropdown-panel-max-height: 70vh;
 }
 
 .ck.ck-dropdown {
@@ -57,6 +58,10 @@
 	@mixin ck-rounded-corners;
 	@mixin ck-drop-shadow;
 
+	/* https://github.com/ckeditor/ckeditor5/issues/952 */
+	max-height: var(--ck-dropdown-panel-max-height);
+	overflow-y: auto;
+
 	/* Disabled radius of top-left border to be consistent with .dropdown__button
 	https://github.com/ckeditor/ckeditor5/issues/816 */
 	@mixin ck-rounded-corners {