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 #139 from ckeditor/t/135
Browse files Browse the repository at this point in the history
Other: Removed the "generic" layer of the theme to simplify it and improve the maintainability. Closes #135.

BREAKING CHANGE: The `.ck-editor-toolbar` CSS class has been removed.
BREAKING CHANGE: Various CSS variables (mostly colors) have been removed. Please make sure your code uses the latest theme API.
BREAKING CHANGE: From now on there's only one subset of the theme, aligned to the default look of CKEditor 5.
  • Loading branch information
oleq authored Feb 16, 2018
2 parents f223d6a + f19411f commit 18809f6
Show file tree
Hide file tree
Showing 14 changed files with 165 additions and 260 deletions.
34 changes: 11 additions & 23 deletions docs/_snippets/examples/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
--ck-color-button-default-disabled-background: var(--ck-custom-background);
--ck-color-button-default-disabled-border: var(--ck-custom-border);

--ck-color-button-on-background: var(--ck-custom-foreground);
--ck-color-button-on-border: var(--ck-custom-border);
--ck-color-button-on-focus-background: hsl(255, 4%, 21%);
--ck-color-button-on-focus-border: hsl(0, 0%, 20%);
--ck-color-button-on-active-background: hsl(255, 4%, 20%);
--ck-color-button-on-active-border: hsl(300, 1%, 19%);
--ck-color-button-on-active-shadow: hsl(240, 3%, 19%);
--ck-color-button-on-disabled-background: var(--ck-custom-foreground);
--ck-color-button-on-disabled-border: var(--ck-custom-border);
--ck-color-button-on-background: hsl(0, 0%, 24%);
--ck-color-button-on-border: transparent;
--ck-color-button-on-focus-background: hsl(0, 0%, 21%);
--ck-color-button-on-focus-border: transparent;
--ck-color-button-on-active-background: hsl(0, 0%, 15%);
--ck-color-button-on-active-border: transparent;
--ck-color-button-on-active-shadow: hsl(0, 0%, 18%);
--ck-color-button-on-disabled-background: transparent;
--ck-color-button-on-disabled-border: transparent;

--ck-color-button-action-background: hsl(168, 76%, 42%);
--ck-color-button-action-border: hsl(168, 60%, 55%);
Expand Down Expand Up @@ -95,20 +95,8 @@

/* -- Overrides the default colors used by the editor --------------------------------------- */

--ck-color-editor-border: var(--ck-custom-background);
--ck-color-editor-toolbar-background: var(--ck-custom-background);

--ck-color-editor-toolbar-button-on-background: hsl(0, 0%, 24%);
--ck-color-editor-toolbar-button-on-border: transparent;
--ck-color-editor-toolbar-button-on-focus-background: hsl(0, 0%, 21%);
--ck-color-editor-toolbar-button-on-focus-border: transparent;
--ck-color-editor-toolbar-button-on-active-background: hsl(0, 0%, 15%);
--ck-color-editor-toolbar-button-on-active-border: transparent;
--ck-color-editor-toolbar-button-on-active-shadow: hsl(0, 0%, 18%);
--ck-color-editor-toolbar-button-on-disabled-background: transparent;
--ck-color-editor-toolbar-button-on-disabled-border: transparent;

--ck-color-editor-dropdown-background: hsl(270, 1%, 33%);
--ck-color-base-border: var(--ck-custom-background);
--ck-color-dropdown-background: hsl(270, 1%, 33%);

/* -- Overrides the default colors used by ckeditor5-image package -------------------------- */

Expand Down
36 changes: 12 additions & 24 deletions docs/framework/guides/theme-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ The file containing custom variables will be named `custom.css` and it will look
--ck-color-button-default-disabled-background: var(--ck-custom-background);
--ck-color-button-default-disabled-border: var(--ck-custom-border);

--ck-color-button-on-background: var(--ck-custom-foreground);
--ck-color-button-on-border: var(--ck-custom-border);
--ck-color-button-on-focus-background: hsl(255, 4%, 21%);
--ck-color-button-on-focus-border: hsl(0, 0%, 20%);
--ck-color-button-on-active-background: hsl(255, 4%, 20%);
--ck-color-button-on-active-border: hsl(300, 1%, 19%);
--ck-color-button-on-active-shadow: hsl(240, 3%, 19%);
--ck-color-button-on-disabled-background: var(--ck-custom-foreground);
--ck-color-button-on-disabled-border: var(--ck-custom-border);
--ck-color-button-on-background: hsl(0, 0%, 24%);
--ck-color-button-on-border: transparent;
--ck-color-button-on-focus-background: hsl(0, 0%, 21%);
--ck-color-button-on-focus-border: transparent;
--ck-color-button-on-active-background: hsl(0, 0%, 15%);
--ck-color-button-on-active-border: transparent;
--ck-color-button-on-active-shadow: hsl(0, 0%, 18%);
--ck-color-button-on-disabled-background: transparent;
--ck-color-button-on-disabled-border: transparent;

--ck-color-button-action-background: hsl(168, 76%, 42%);
--ck-color-button-action-border: hsl(168, 60%, 55%);
Expand Down Expand Up @@ -152,7 +152,7 @@ The file containing custom variables will be named `custom.css` and it will look

/* -- Overrides the default .ck-toolbar class colors ---------------------------------------- */

--ck-color-toolbar-background: var(--ck-custom-foreground);
--ck-color-toolbar-background: var(--ck-custom-background);
--ck-color-toolbar-border: var(--ck-custom-border);

/* -- Overrides the default .ck-tooltip class colors ---------------------------------------- */
Expand All @@ -162,20 +162,8 @@ The file containing custom variables will be named `custom.css` and it will look

/* -- Overrides the default colors used by the editor --------------------------------------- */

--ck-color-editor-border: var(--ck-custom-background);
--ck-color-editor-toolbar-background: var(--ck-custom-background);

--ck-color-editor-toolbar-button-on-background: hsl(0, 0%, 24%);
--ck-color-editor-toolbar-button-on-border: transparent;
--ck-color-editor-toolbar-button-on-focus-background: hsl(0, 0%, 21%);
--ck-color-editor-toolbar-button-on-focus-border: transparent;
--ck-color-editor-toolbar-button-on-active-background: hsl(0, 0%, 15%);
--ck-color-editor-toolbar-button-on-active-border: transparent;
--ck-color-editor-toolbar-button-on-active-shadow: hsl(0, 0%, 18%);
--ck-color-editor-toolbar-button-on-disabled-background: transparent;
--ck-color-editor-toolbar-button-on-disabled-border: transparent;

--ck-color-editor-dropdown-background: hsl(270, 1%, 33%);
--ck-color-base-border: var(--ck-custom-background);
--ck-color-dropdown-background: hsl(270, 1%, 33%);

/* -- Overrides the default colors used by ckeditor5-image package -------------------------- */

Expand Down
25 changes: 12 additions & 13 deletions tests/manual/inverted.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

/* -- Overrides the default .ck-toolbar class colors ---------------------------------------- */

--ck-color-toolbar-background: var(--ck-custom-foreground);
--ck-color-toolbar-background: var(--ck-custom-background);
--ck-color-toolbar-border: var(--ck-custom-border);

/* -- Overrides the default .ck-tooltip class colors ---------------------------------------- */
Expand All @@ -91,20 +91,19 @@

/* -- Overrides the default colors used by the editor --------------------------------------- */

--ck-color-editor-border: var(--ck-custom-background);
--ck-color-editor-toolbar-background: var(--ck-custom-background);
--ck-color-base-border: var(--ck-custom-background);

--ck-color-editor-toolbar-button-on-background: hsl(0, 0%, 18%);
--ck-color-editor-toolbar-button-on-border: transparent;
--ck-color-editor-toolbar-button-on-focus-background: hsl(0, 0%, 21%);
--ck-color-editor-toolbar-button-on-focus-border: transparent;
--ck-color-editor-toolbar-button-on-active-background: hsl(0, 0%, 15%);
--ck-color-editor-toolbar-button-on-active-border: transparent;
--ck-color-editor-toolbar-button-on-active-shadow: hsl(0, 0%, 18%);
--ck-color-editor-toolbar-button-on-disabled-background: transparent;
--ck-color-editor-toolbar-button-on-disabled-border: transparent;
--ck-color-button-on-background: hsl(0, 0%, 18%);
--ck-color-button-on-border: transparent;
--ck-color-button-on-focus-background: hsl(0, 0%, 21%);
--ck-color-button-on-focus-border: transparent;
--ck-color-button-on-active-background: hsl(0, 0%, 15%);
--ck-color-button-on-active-border: transparent;
--ck-color-button-on-active-shadow: hsl(0, 0%, 18%);
--ck-color-button-on-disabled-background: transparent;
--ck-color-button-on-disabled-border: transparent;

--ck-color-editor-dropdown-background: hsl(270, 1%, 33%);
--ck-color-editor-background: hsl(270, 1%, 33%);

/* -- Overrides the default colors used by ckeditor5-image package -------------------------- */

Expand Down
6 changes: 0 additions & 6 deletions tests/manual/theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ <h3>Button: Icon</h3>

<div id="button-icon-custom"></div>

<br/>
<br/>

<div id="button-icon-states"></div>
Expand All @@ -68,7 +67,6 @@ <h3>Button: Responsiveness</h3>

<h3>Button: Tooltip</h3>
<div id="button-tooltip" class="ck-reset_all"></div>
<hr/>

<h2>Dropdown</h2>

Expand All @@ -78,8 +76,6 @@ <h3>ListDropdown</h3>
<h3>ButtonDropdown</h3>
<div id="button-dropdown" class="ck-reset_all"></div>

<hr/>

<h2>Toolbar</h2>

<h3>Toolbar: Text</h3>
Expand All @@ -100,8 +96,6 @@ <h3>Toolbar: Item separators</h3>
<h3>Toolbar: Multi-row</h3>
<div id="toolbar-multi-row" class="ck-reset_all"></div>

<hr/>

<h2>Inputs</h2>

<h3>Labeled</h3>
Expand Down
Loading

0 comments on commit 18809f6

Please sign in to comment.