Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #367 from ckeditor/t/ckeditor5/831
Browse files Browse the repository at this point in the history
Fix: Button icon styles should not touch the dropdown's arrow. Closes ckeditor/ckeditor5#831.
  • Loading branch information
oleq authored Feb 9, 2018
2 parents 052bfb1 + d19d71a commit 507549f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
6 changes: 6 additions & 0 deletions src/button/buttonview.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ export default class ButtonView extends View {

iconView.bind( 'content' ).to( this, 'icon' );

iconView.extendTemplate( {
attributes: {
class: 'ck-button__icon'
}
} );

this.children.add( iconView );
}

Expand Down
1 change: 1 addition & 0 deletions tests/button/buttonview.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ describe( 'ButtonView', () => {

expect( view.iconView ).to.instanceOf( IconView );
expect( view.iconView.content ).to.equal( '<svg></svg>' );
expect( view.iconView.element.classList.contains( 'ck-button__icon' ) ).to.be.true;

view.icon = '<svg>bar</svg>';
expect( view.iconView.content ).to.equal( '<svg>bar</svg>' );
Expand Down
1 change: 0 additions & 1 deletion theme/components/button/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* For licensing, see LICENSE.md.
*/

@import "./mixins/_button.css";
@import "../../mixins/_unselectable.css";
@import "../tooltip/mixins/_tooltip.css";

Expand Down
13 changes: 0 additions & 13 deletions theme/components/button/mixins/_button.css

This file was deleted.

0 comments on commit 507549f

Please sign in to comment.