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

i/6446: Fix the table selection background #282

Merged
merged 4 commits into from
Apr 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions theme/ckeditor5-table/tableselection.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,31 @@
*/

:root {
--ck-table-selected-cell-background: hsl(210, 92%, 90%);
--ck-table-selected-cell-background: hsla(208, 90%, 80%, .3);
}

.ck.ck-editor__editable .table table {
& td.ck-editor__editable_selected,
& th.ck-editor__editable_selected {
background-color: var(--ck-table-selected-cell-background) !important;

position: relative;
caret-color: transparent;
outline: unset;
box-shadow: unset;

& ::selection {
/* https://github.com/ckeditor/ckeditor5/issues/6446 */
&:after {
content: '';
pointer-events: none;
background-color: var(--ck-table-selected-cell-background);
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}

& ::selection,
&:focus {
background-color: transparent;
}

Expand All @@ -25,4 +37,3 @@
}
}
}