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

Commit

Permalink
Change the value of the focused cell background variable
Browse files Browse the repository at this point in the history
  • Loading branch information
panr committed Mar 11, 2020
1 parent adbc08d commit 7522711
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions theme/ckeditor5-table/tableediting.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,24 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

.ck-widget.table {
& .ck-editor__nested-editable.ck-editor__nested-editable_focused,
& .ck-editor__nested-editable:focus {
background: inherit;

/* Fixes the problem where surrounding cells cover the focused cell's border.
It does not fix the problem in all places but the UX is improved.
See https://github.com/ckeditor/ckeditor5-table/issues/29. */
border-style: none;
outline: 1px solid var(--ck-color-focus-border);
outline-offset: -1px; /* progressive enhancement - no IE support */
}
:root {
--ck-color-table-focused-cell-background: hsla(208, 90%, 80%, .3);
}

.ck-widget.table {
& td,
& th {
&.ck-editor__nested-editable.ck-editor__nested-editable_focused,
&.ck-editor__nested-editable:focus {
/* We can't just set `inherit` here as well, because we use `hsla` as an "overlay"
to darken the background based on the set table background.
The value should be the same as for the table header element without focus.
See related issue https://github.com/ckeditor/ckeditor5/issues/6228.
/* A very slight background to highlight the focused cell */
background: var(--ck-color-table-focused-cell-background);

This is also a workaround for overriding the styling that comes from the `widget`. */
background: hsla(0, 0%, 0%, 10%);
/* Fixes the problem where surrounding cells cover the focused cell's border.
It does not fix the problem in all places but the UX is improved.
See https://github.com/ckeditor/ckeditor5-table/issues/29. */
border-style: none;
outline: 1px solid var(--ck-color-focus-border);
outline-offset: -1px; /* progressive enhancement - no IE support */
}
}
}

0 comments on commit 7522711

Please sign in to comment.