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 #55 from ckeditor/t/54
Browse files Browse the repository at this point in the history
t/54: Created styles for contextual toolbar.
  • Loading branch information
Reinmar committed Dec 16, 2016
2 parents 71e30aa + 5fc2cb1 commit e660297
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 31 deletions.
20 changes: 20 additions & 0 deletions theme/components/balloonpanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ $ck-balloon-arrow-half-width: 10px;
z-index: ck-z( 'default', 1 );
}

&_arrow_s,
&_arrow_se,
&_arrow_sw {
&:before,
Expand All @@ -57,6 +58,7 @@ $ck-balloon-arrow-half-width: 10px;
}
}

&_arrow_n,
&_arrow_ne,
&_arrow_nw {
&:before,
Expand All @@ -76,6 +78,15 @@ $ck-balloon-arrow-half-width: 10px;
}
}

&_arrow_s {
&:before,
&:after {
left: 50%;
margin-left: -$ck-balloon-arrow-half-width;
top: -$ck-balloon-arrow-height;
}
}

&_arrow_se {
&:before,
&:after {
Expand All @@ -92,6 +103,15 @@ $ck-balloon-arrow-half-width: 10px;
}
}

&_arrow_n {
&:before,
&:after {
left: 50%;
margin-left: -$ck-balloon-arrow-half-width;
bottom: -$ck-balloon-arrow-height;
}
}

&_arrow_ne {
&:before,
&:after {
Expand Down
64 changes: 33 additions & 31 deletions theme/components/editor.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
// Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
// For licensing, see LICENSE.md or http://ckeditor.com/license

@mixin ck-editor-toolbar {
// Toolbars should not react to ck-rounded-corners() mixin.
border-radius: 0;

.ck-button {
border-width: 0;

// Make sure the next button does not overlap focused one.
&:focus {
z-index: 1;
}

&:not(:hover):not(:focus):not(.ck-on),
&.ck-disabled {
background: ck-color( 'foreground' );
}

&.ck-on {
@include ck-button-colors( 'foreground', -10 );
}
}

.ck-dropdown__button {
border-width: 1px;

&:not(:hover):not(:focus):not(.ck-on) {
background: ck-color( 'background' );
}
}
}

// TODO/NOTE: This along with _editor helper will probably become a creator theme.
@include ck-editor {
@include ck-rounded-corners();
Expand All @@ -12,6 +43,8 @@

.ck-editor__top {
.ck-toolbar {
@include ck-editor-toolbar();

border-top: 0;
border-left: 0;
border-right: 0;
Expand Down Expand Up @@ -40,37 +73,6 @@
padding: 0 ck-spacing();
}
}

.ck-toolbar {
// Toolbars should not react to ck-rounded-corners() mixin.
border-radius: 0;

.ck-button {
border-width: 0;

// Make sure the next button does not overlap focused one.
&:focus {
z-index: 1;
}

&:not(:hover):not(:focus):not(.ck-on),
&.ck-disabled {
background: ck-color( 'foreground' );
}

&.ck-on {
@include ck-button-colors( 'foreground', -10 );
}
}

.ck-dropdown__button {
border-width: 1px;

&:not(:hover):not(:focus):not(.ck-on) {
background: ck-color( 'background' );
}
}
}
}

.ck-editor,
Expand Down

0 comments on commit e660297

Please sign in to comment.