ソースを参照

Merge branch 'master' into t/291

Aleksander Nowodzinski 8 年 前
コミット
93748d2c8f

+ 47 - 0
packages/ckeditor5-ui/CHANGELOG.md

@@ -1,6 +1,53 @@
 Changelog
 =========
 
+## [0.10.0](https://github.com/ckeditor/ckeditor5-ui/compare/v0.9.0...v0.10.0) (2017-09-03)
+
+### Bug fixes
+
+* `ContextualToolbar` should have proper editor toolbar styling. Closes [#230](https://github.com/ckeditor/ckeditor5-ui/issues/230). ([4e2ee36](https://github.com/ckeditor/ckeditor5-ui/commit/4e2ee36))
+* BalloonPanelView should prevent native #selectstart event. Closes [#243](https://github.com/ckeditor/ckeditor5-ui/issues/243). ([cba3fb1](https://github.com/ckeditor/ckeditor5-ui/commit/cba3fb1))
+* Button tooltip should not look blurry on low-DPI screens. Closes [#142](https://github.com/ckeditor/ckeditor5-ui/issues/142). Closes [#133](https://github.com/ckeditor/ckeditor5-ui/issues/133). ([a497aff](https://github.com/ckeditor/ckeditor5-ui/commit/a497aff))
+* Clicking and dragging in a drop-down panel should not break the selection. Closes [#228](https://github.com/ckeditor/ckeditor5-ui/issues/228). ([6066a09](https://github.com/ckeditor/ckeditor5-ui/commit/6066a09))
+* Contextual toolbar should re–position correctly on window scroll. Closes [#227](https://github.com/ckeditor/ckeditor5-ui/issues/227). ([e5ea25f](https://github.com/ckeditor/ckeditor5-ui/commit/e5ea25f))
+* `DropdownView` should open upon arrow down key press. Closes [#249](https://github.com/ckeditor/ckeditor5-ui/issues/249). ([c1e6afc](https://github.com/ckeditor/ckeditor5-ui/commit/c1e6afc))
+* List items should handle Enter and Space key press when focused. Closes [#153](https://github.com/ckeditor/ckeditor5-ui/issues/153). ([403b64a](https://github.com/ckeditor/ckeditor5-ui/commit/403b64a))
+* The `clickOutsideHandler` helper should use `mousedown` instead of `mouseup` event. Closes [#281](https://github.com/ckeditor/ckeditor5-ui/issues/281). ([6b980b6](https://github.com/ckeditor/ckeditor5-ui/commit/6b980b6))
+* The `Template` class should not throw an error when a child view in the definition has an `id` attribute set without a value. Closes [#289](https://github.com/ckeditor/ckeditor5-ui/issues/289). ([d7072ba](https://github.com/ckeditor/ckeditor5-ui/commit/d7072ba))
+* The `TooltipView` should hide when the `TooltipView#text` is empty. The `ButtonView's` ability to get a tooltip should not be restricted after `View` initialization. Closes [#283](https://github.com/ckeditor/ckeditor5-ui/issues/283). ([1588c82](https://github.com/ckeditor/ckeditor5-ui/commit/1588c82))
+* The dropdown menu should not open using the keyboard when disabled. Closes [#238](https://github.com/ckeditor/ckeditor5-ui/issues/238). ([fc524b8](https://github.com/ckeditor/ckeditor5-ui/commit/fc524b8))
+
+### Features
+
+* `StickyToolbarView` now supports a configurable vertical offset from the top of the page. Closes [#277](https://github.com/ckeditor/ckeditor5-ui/issues/277). ([245f0fa](https://github.com/ckeditor/ckeditor5-ui/commit/245f0fa))
+
+  Also implemented the `normalizeToolbarConfig()` utility.
+* Added `TextInputView#isReadOnly` and `LabeledInputView#isReadOnly`  states. Closes [#266](https://github.com/ckeditor/ckeditor5-ui/issues/266). Closes [#268](https://github.com/ckeditor/ckeditor5-ui/issues/268). ([111a728](https://github.com/ckeditor/ckeditor5-ui/commit/111a728))
+* Added optional notification title. Closes [#241](https://github.com/ckeditor/ckeditor5-ui/issues/241). ([abbb68f](https://github.com/ckeditor/ckeditor5-ui/commit/abbb68f))
+* Allowed `BalloonPanelView` position limiter defined as a function. Made `ContextualBalloon` position limiter configurable via `#positionLimiter` property. Closes [#260](https://github.com/ckeditor/ckeditor5-ui/issues/260). ([322563e](https://github.com/ckeditor/ckeditor5-ui/commit/322563e))
+* Implemented placeholder in `InputTextView`. Closes [#220](https://github.com/ckeditor/ckeditor5-ui/issues/220). ([5d91d18](https://github.com/ckeditor/ckeditor5-ui/commit/5d91d18))
+* Introduced `CommandFactory#names()`. Closes [#287](https://github.com/ckeditor/ckeditor5-ui/issues/287). ([4038da2](https://github.com/ckeditor/ckeditor5-ui/commit/4038da2))
+
+### Other changes
+
+* Add support for multiple context elements in the `clickOutsideHandler` helper. Closes [#261](https://github.com/ckeditor/ckeditor5-ui/issues/261). ([9da5bf7](https://github.com/ckeditor/ckeditor5-ui/commit/9da5bf7))
+* Added the `beforeShow` event to the `ContextualToolbar` plugin. Closes [#222](https://github.com/ckeditor/ckeditor5-ui/issues/222). ([835d0ac](https://github.com/ckeditor/ckeditor5-ui/commit/835d0ac))
+* Implemented public `show()` and `hide()` methods in the `ContextualToolbar` plugin. Closes [#263](https://github.com/ckeditor/ckeditor5-ui/issues/263). ([eb4caab](https://github.com/ckeditor/ckeditor5-ui/commit/eb4caab))
+* Improvements in the `BalloonPanelView`–based components for the balloon toolbar editor. Closes [#236](https://github.com/ckeditor/ckeditor5-ui/issues/236). Closes [#234](https://github.com/ckeditor/ckeditor5-ui/issues/234). Closes [#224](https://github.com/ckeditor/ckeditor5-ui/issues/224). ([737b55f](https://github.com/ckeditor/ckeditor5-ui/commit/737b55f))
+* Made the UI component initialization and destruction processes synchronous. Closes [#225](https://github.com/ckeditor/ckeditor5-ui/issues/225). ([07e1502](https://github.com/ckeditor/ckeditor5-ui/commit/07e1502))
+* Made the UI destruction a fail–safe, repeatable process. Closes [#248](https://github.com/ckeditor/ckeditor5-ui/issues/248). ([6f5ec0d](https://github.com/ckeditor/ckeditor5-ui/commit/6f5ec0d))
+* The `ContextualToolbar` should not show up when all child items are disabled. The `ContextualToolbar#beforeShow` event has been replaced by `ContextualToolbar#show`. Closes [#269](https://github.com/ckeditor/ckeditor5-ui/issues/269). Closes [#232](https://github.com/ckeditor/ckeditor5-ui/issues/232). ([d83d07d](https://github.com/ckeditor/ckeditor5-ui/commit/d83d07d))
+
+### BREAKING CHANGES
+
+* `StickyToolbarView#limiterOffset` has been renamed to `StickyToolbarView#limiterBottomOffset`.
+* `ContextualToolbar#beforeShow` is no longer available. Please refer to `ContextualToolbar#show` instead.
+* The `clickOutsideHandler` helper's `contextElement` config option is now an `Array` named `contextElements`.
+* `View#init()`, `View#destroy()` (also `ViewCollection#init()`, `ViewCollection#destroy()` and `ViewCollection#add()`) no longer return `Promise`. It may require updates in UI components which inherit from `View` and rely on the value returned by these methods.
+* Various UI components switched to synchronous `init()` and `destroy()` (no longer returning `Promise`), which means that features using these components may need some updates to work properly.
+* The position names in `BalloonPanelView.defaultPositions` and their results have changed. Please refer to the latest API documentation to learn more.
+
+
 ## [0.9.0](https://github.com/ckeditor/ckeditor5-ui/compare/v0.8.0...v0.9.0) (2017-05-07)
 
 ### Bug fixes

+ 14 - 0
packages/ckeditor5-ui/lang/translations/gl.po

@@ -0,0 +1,14 @@
+# Copyright (c) Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+msgid ""
+msgstr ""
+"Language: gl\n"
+"Language-Team: Galician (https://www.transifex.com/ckeditor/teams/11143/gl/)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "Title of the CKEditor5 editor."
+msgid "Rich Text Editor, %0"
+msgstr "Editor de texto mellorado, %0"
+
+msgctxt "Title of the CKEditor5 editor."
+msgid "Rich Text Editor"
+msgstr "Editor de texto mellorado"

+ 14 - 0
packages/ckeditor5-ui/lang/translations/ja.po

@@ -0,0 +1,14 @@
+# Copyright (c) Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+msgid ""
+msgstr ""
+"Language: ja\n"
+"Language-Team: Japanese (https://www.transifex.com/ckeditor/teams/11143/ja/)\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgctxt "Title of the CKEditor5 editor."
+msgid "Rich Text Editor, %0"
+msgstr "リッチテキストエディター, %0"
+
+msgctxt "Title of the CKEditor5 editor."
+msgid "Rich Text Editor"
+msgstr "リッチテキストエディター"

+ 14 - 0
packages/ckeditor5-ui/lang/translations/sv.po

@@ -0,0 +1,14 @@
+# Copyright (c) Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+msgid ""
+msgstr ""
+"Language: sv\n"
+"Language-Team: Swedish (https://www.transifex.com/ckeditor/teams/11143/sv/)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "Title of the CKEditor5 editor."
+msgid "Rich Text Editor, %0"
+msgstr "Rich Text-editor, %0"
+
+msgctxt "Title of the CKEditor5 editor."
+msgid "Rich Text Editor"
+msgstr "Rich Text-editor"

+ 1 - 1
packages/ckeditor5-ui/lang/translations/zh-cn.po

@@ -11,4 +11,4 @@ msgstr "富文本编辑器, %0"
 
 msgctxt "Title of the CKEditor5 editor."
 msgid "Rich Text Editor"
-msgstr ""
+msgstr "富文本编辑器"

+ 14 - 0
packages/ckeditor5-ui/lang/translations/zh.po

@@ -0,0 +1,14 @@
+# Copyright (c) Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+msgid ""
+msgstr ""
+"Language: zh_TW\n"
+"Language-Team: Chinese (Taiwan) (https://www.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgctxt "Title of the CKEditor5 editor."
+msgid "Rich Text Editor, %0"
+msgstr "豐富文字編輯器,%0"
+
+msgctxt "Title of the CKEditor5 editor."
+msgid "Rich Text Editor"
+msgstr "豐富文字編輯器"

+ 14 - 14
packages/ckeditor5-ui/package.json

@@ -1,27 +1,27 @@
 {
   "name": "@ckeditor/ckeditor5-ui",
-  "version": "0.9.0",
+  "version": "0.10.0",
   "description": "The UI framework of CKEditor 5.",
   "keywords": [
     "CKEditor"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-theme-lark": "^0.8.0",
-    "@ckeditor/ckeditor5-utils": "^0.9.1"
+    "@ckeditor/ckeditor5-core": "^0.9.0",
+    "@ckeditor/ckeditor5-theme-lark": "^0.9.0",
+    "@ckeditor/ckeditor5-utils": "^0.10.0"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-basic-styles": "^0.8.1",
-    "@ckeditor/ckeditor5-core": "^0.8.1",
+    "@ckeditor/ckeditor5-basic-styles": "^0.9.0",
     "@ckeditor/ckeditor5-dev-lint": "^3.1.0",
-    "@ckeditor/ckeditor5-editor-classic": "^0.7.3",
-    "@ckeditor/ckeditor5-engine": "^0.10.0",
-    "@ckeditor/ckeditor5-enter": "^0.9.1",
-    "@ckeditor/ckeditor5-heading": "^0.9.1",
-    "@ckeditor/ckeditor5-image": "^0.6.0",
-    "@ckeditor/ckeditor5-link": "^0.7.0",
-    "@ckeditor/ckeditor5-paragraph": "^0.8.0",
-    "@ckeditor/ckeditor5-typing": "^0.9.1",
-    "@ckeditor/ckeditor5-undo": "^0.8.1",
+    "@ckeditor/ckeditor5-editor-classic": "^0.8.0",
+    "@ckeditor/ckeditor5-engine": "^0.11.0",
+    "@ckeditor/ckeditor5-enter": "^0.10.0",
+    "@ckeditor/ckeditor5-heading": "^0.10.0",
+    "@ckeditor/ckeditor5-image": "^0.7.0",
+    "@ckeditor/ckeditor5-link": "^0.8.0",
+    "@ckeditor/ckeditor5-paragraph": "^0.9.0",
+    "@ckeditor/ckeditor5-typing": "^0.10.0",
+    "@ckeditor/ckeditor5-undo": "^0.9.0",
     "del": "^2.2.0",
     "eslint-config-ckeditor5": "^1.0.5",
     "gulp": "^3.9.1",

+ 2 - 1
packages/ckeditor5-ui/src/editableui/editableuiview.js

@@ -37,7 +37,8 @@ export default class EditableUIView extends View {
 			attributes: {
 				class: [
 					bind.to( 'isFocused', value => value ? 'ck-focused' : 'ck-blurred' ),
-					'ck-editor__editable'
+					'ck-editor__editable',
+					'ck-rounded-corners'
 				],
 				contenteditable: bind.to( 'isReadOnly', value => !value ),
 			}

+ 1 - 10
packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.js

@@ -13,7 +13,6 @@ import { getOptimalPosition } from '@ckeditor/ckeditor5-utils/src/dom/position';
 import isRange from '@ckeditor/ckeditor5-utils/src/dom/isrange';
 import isElement from '@ckeditor/ckeditor5-utils/src/lib/lodash/isElement';
 import toUnit from '@ckeditor/ckeditor5-utils/src/dom/tounit';
-import preventDefault from '../../bindings/preventdefault.js';
 import global from '@ckeditor/ckeditor5-utils/src/dom/global';
 
 const toPx = toUnit( 'px' );
@@ -130,15 +129,7 @@ export default class BalloonPanelView extends View {
 				}
 			},
 
-			children: this.content,
-
-			on: {
-				// https://github.com/ckeditor/ckeditor5-ui/issues/206
-				mousedown: preventDefault( this ),
-
-				// https://github.com/ckeditor/ckeditor5-ui/issues/243
-				selectstart: bind.to( evt => evt.preventDefault() )
-			}
+			children: this.content
 		} );
 	}
 

+ 2 - 0
packages/ckeditor5-ui/tests/editableui/editableuiview.js

@@ -35,6 +35,7 @@ describe( 'EditableUIView', () => {
 			view.init();
 			expect( view.element ).to.equal( view.editableElement );
 			expect( view.element.classList.contains( 'ck-editor__editable' ) ).to.be.true;
+			expect( view.element.classList.contains( 'ck-rounded-corners' ) ).to.be.true;
 			expect( view.externalElement ).to.be.undefined;
 		} );
 
@@ -45,6 +46,7 @@ describe( 'EditableUIView', () => {
 			expect( view.element ).to.equal( editableElement );
 			expect( view.element ).to.equal( view.editableElement );
 			expect( view.element.classList.contains( 'ck-editor__editable' ) ).to.be.true;
+			expect( view.element.classList.contains( 'ck-rounded-corners' ) ).to.be.true;
 			expect( view.externalElement ).to.equal( editableElement );
 		} );
 	} );

+ 2 - 2
packages/ckeditor5-ui/tests/manual/contextualballoon/contextualballoon.js

@@ -6,13 +6,13 @@
 /* globals window, document, console:false */
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
-import ArticlePresets from '@ckeditor/ckeditor5-presets/src/article';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import ContextualToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/contextual/contextualtoolbar';
 
 // Finally the editor.
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
-		plugins: [ ArticlePresets, ContextualToolbar ],
+		plugins: [ ArticlePluginSet, ContextualToolbar ],
 		toolbar: [ 'bold', 'link' ],
 		contextualToolbar: [ 'bold', 'link' ]
 	} )

+ 3 - 3
packages/ckeditor5-ui/tests/manual/contextualballoon/externalchanges.js

@@ -7,7 +7,7 @@
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
 import ContextualToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/contextual/contextualtoolbar';
-import ArticlePresets from '@ckeditor/ckeditor5-presets/src/article';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 
 import Element from '@ckeditor/ckeditor5-engine/src/model/element';
 import Text from '@ckeditor/ckeditor5-engine/src/model/text';
@@ -17,7 +17,7 @@ import Range from '@ckeditor/ckeditor5-engine/src/model/range';
 // Editor for the external insert.
 ClassicEditor
 	.create( document.querySelector( '#editor-insert' ), {
-		plugins: [ ArticlePresets, ContextualToolbar ],
+		plugins: [ ArticlePluginSet, ContextualToolbar ],
 		toolbar: [ 'bold', 'link' ],
 		contextualToolbar: [ 'bold', 'link' ]
 	} )
@@ -34,7 +34,7 @@ ClassicEditor
 // Editor for the external delete.
 ClassicEditor
 	.create( document.querySelector( '#editor-delete' ), {
-		plugins: [ ArticlePresets, ContextualToolbar ],
+		plugins: [ ArticlePluginSet, ContextualToolbar ],
 		toolbar: [ 'bold', 'link' ],
 		contextualToolbar: [ 'bold', 'link' ]
 	} )

+ 2 - 2
packages/ckeditor5-ui/tests/manual/contextualtoolbar/contextualtoolbar.js

@@ -6,13 +6,13 @@
 /* globals window, document, console:false */
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
-import ArticlePresets from '@ckeditor/ckeditor5-presets/src/article';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import ContextualToolbar from '../../../src/toolbar/contextual/contextualtoolbar';
 import Range from '@ckeditor/ckeditor5-engine/src/model/range';
 
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
-		plugins: [ ArticlePresets, ContextualToolbar ],
+		plugins: [ ArticlePluginSet, ContextualToolbar ],
 		toolbar: [ 'bold', 'italic', 'link', 'undo', 'redo' ],
 		contextualToolbar: [ 'bold', 'italic', 'link' ]
 	} )

+ 3 - 3
packages/ckeditor5-ui/tests/manual/tickets/170/1.js

@@ -6,7 +6,7 @@
 /* globals window, document, console:false */
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
-import ArticlePresets from '@ckeditor/ckeditor5-presets/src/article';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import BalloonPanelView from '../../../../src/panel/balloon/balloonpanelview';
 
 // Set initial scroll for the outer container element.
@@ -15,7 +15,7 @@ document.querySelector( '.container-outer' ).scrollTop = 450;
 // Init editor with balloon attached to the target element.
 ClassicEditor
 	.create( document.querySelector( '#editor-attach' ), {
-		plugins: [ ArticlePresets ],
+		plugins: [ ArticlePluginSet ],
 		toolbar: [ 'bold', 'italic', 'undo', 'redo' ]
 	} )
 	.then( editor => {
@@ -41,7 +41,7 @@ ClassicEditor
 // Init editor with balloon sticked to the target element.
 ClassicEditor
 	.create( document.querySelector( '#editor-stick' ), {
-		plugins: [ ArticlePresets ],
+		plugins: [ ArticlePluginSet ],
 		toolbar: [ 'bold', 'italic', 'undo', 'redo' ]
 	} )
 	.then( editor => {

+ 3 - 3
packages/ckeditor5-ui/tests/manual/tickets/198/1.js

@@ -6,7 +6,7 @@
 /* globals console:false, document, setTimeout */
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
-import ArticlePresets from '@ckeditor/ckeditor5-presets/src/article';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import ContextualToolbar from '../../../../src/toolbar/contextual/contextualtoolbar';
 
 import Element from '@ckeditor/ckeditor5-engine/src/model/element';
@@ -17,7 +17,7 @@ import Range from '@ckeditor/ckeditor5-engine/src/model/range';
 // Editor for the external insert.
 ClassicEditor
 	.create( document.querySelector( '#editor-insert' ), {
-		plugins: [ ArticlePresets, ContextualToolbar ],
+		plugins: [ ArticlePluginSet, ContextualToolbar ],
 		toolbar: [ 'undo', 'redo' ],
 		contextualToolbar: [ 'bold', 'italic' ]
 	} )
@@ -34,7 +34,7 @@ ClassicEditor
 // Editor for the external delete.
 ClassicEditor
 	.create( document.querySelector( '#editor-delete' ), {
-		plugins: [ ArticlePresets, ContextualToolbar ],
+		plugins: [ ArticlePluginSet, ContextualToolbar ],
 		toolbar: [ 'undo', 'redo' ],
 		contextualToolbar: [ 'bold', 'italic' ]
 	} )

+ 2 - 2
packages/ckeditor5-ui/tests/manual/tickets/228/1.js

@@ -6,11 +6,11 @@
 /* globals document, console:false */
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
-import ArticlePresets from '@ckeditor/ckeditor5-presets/src/article';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
-		plugins: [ ArticlePresets ],
+		plugins: [ ArticlePluginSet ],
 		toolbar: [ 'headings' ],
 	} )
 	.catch( err => console.error( err.stack ) );

+ 0 - 21
packages/ckeditor5-ui/tests/panel/balloon/balloonpanelview.js

@@ -121,27 +121,6 @@ describe( 'BalloonPanelView', () => {
 				expect( view.element.childNodes.length ).to.equal( 1 );
 			} );
 		} );
-
-		describe( 'event listeners', () => {
-			it( 'prevent default on #mousedown', () => {
-				const evt = new Event( 'mousedown', { bubbles: true } );
-				const spy = sinon.spy( evt, 'preventDefault' );
-
-				view.element.dispatchEvent( evt );
-				sinon.assert.calledOnce( spy );
-			} );
-
-			// https://github.com/ckeditor/ckeditor5-ui/issues/243
-			it( 'prevents default on #selectstart', () => {
-				const event = new Event( 'selectstart', { bubbles: true } );
-				const spy = sinon.spy( event, 'preventDefault' );
-				const child = document.createElement( 'div' );
-
-				view.element.appendChild( child );
-				child.dispatchEvent( event );
-				sinon.assert.calledOnce( spy );
-			} );
-		} );
 	} );
 
 	describe( 'show()', () => {

+ 8 - 4
packages/ckeditor5-ui/theme/components/icon.scss

@@ -1,14 +1,18 @@
 // Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
 // For licensing, see LICENSE.md or http://ckeditor.com/license
 
+@import '~@ckeditor/ckeditor5-theme-lark/theme/helpers/_fonts';
+
 /**
- * Default width/height of an icon.
+ * Default width/height of an icon. Note that it equals the default
+ * height of the line of text, so e.g. it matches the height of the
+ * button's label.
  */
-$ck-icon-size: 20px;
+$ck-icon-min-size: round( $ck-font-size-base * $ck-line-height-base );
 
 svg.ck-icon {
-	min-width: $ck-icon-size;
-	min-height: $ck-icon-size;
+	min-width: $ck-icon-min-size;
+	min-height: $ck-icon-min-size;
 
 	font-size: 1em;
 	vertical-align: middle;

+ 0 - 2
packages/ckeditor5-ui/theme/components/panel/balloonpanel.scss

@@ -2,8 +2,6 @@
 // For licensing, see LICENSE.md or http://ckeditor.com/license
 
 .ck-balloon-panel {
-	@include ck-unselectable();
-
 	display: none;
 	position: absolute;