Преглед изворни кода

Add "ck-balloon-toolbar_min-width" class to set default min-width for the balloon toolbar

panr пре 5 година
родитељ
комит
5ee12bba43

+ 1 - 1
packages/ckeditor5-ui/src/toolbar/balloon/balloontoolbar.js

@@ -185,7 +185,7 @@ export default class BalloonToolbar extends Plugin {
 
 		toolbarView.extendTemplate( {
 			attributes: {
-				class: [ 'ck-toolbar_floating' ]
+				class: [ 'ck-toolbar_floating', 'ck-balloon-toolbar_min-width' ]
 			}
 		} );
 

+ 9 - 0
packages/ckeditor5-ui/theme/components/toolbar/toolbar.css

@@ -51,4 +51,13 @@
 			display: none;
 		}
 	}
+
+	/* Balloon Toolbar
+	 *
+	 * This class can be used to set a different min-width for the balloon toolbar.
+	 * NOTE: It can also overrule a width and max-width of the balloon toolbar if it will be set with a higher value.
+	 */
+	&.ck-balloon-toolbar_min-width {
+		min-width: 180px;
+	}
 }