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

Commit

Permalink
Renamed .ck-widget_selectable to .ck-widget_with-selection-handler. M…
Browse files Browse the repository at this point in the history
…oved the selection handler crop prevention code to widget.css.
  • Loading branch information
oleq committed Jan 17, 2019
1 parent 5110584 commit 9e75626
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 0 additions & 8 deletions theme/ckeditor5-table/tableediting.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,3 @@
}
}
}

.ck-editor__editable > .table:first-child,
.ck-editor__editable blockquote > .table:first-child {
/* Do not truncate selection handler if table is a first-child in the blockquote or content.
https://github.com/ckeditor/ckeditor5-block-quote/issues/28
https://github.com/ckeditor/ckeditor5-widget/issues/44 */
margin-top: calc(1em + var(--ck-widget-handler-icon-size));
}
12 changes: 11 additions & 1 deletion theme/ckeditor5-widget/widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,17 @@
}
}

.ck .ck-widget.ck-widget_selectable {
.ck-editor__editable > .ck-widget.ck-widget_with-selection-handler:first-child,
.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handler:first-child {
/* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.
In fact, anything with overflow: hidden.
https://github.com/ckeditor/ckeditor5-block-quote/issues/28
https://github.com/ckeditor/ckeditor5-widget/issues/44
https://github.com/ckeditor/ckeditor5-widget/issues/66 */
margin-top: calc(1em + var(--ck-widget-handler-icon-size));
}

.ck .ck-widget.ck-widget_with-selection-handler {
& .ck-widget__selection-handler {
padding: 4px;
box-sizing: border-box;
Expand Down

0 comments on commit 9e75626

Please sign in to comment.