diff --git a/theme/ckeditor5-table/tableediting.css b/theme/ckeditor5-table/tableediting.css index 70d102b..51b5b27 100644 --- a/theme/ckeditor5-table/tableediting.css +++ b/theme/ckeditor5-table/tableediting.css @@ -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)); -} diff --git a/theme/ckeditor5-widget/widget.css b/theme/ckeditor5-widget/widget.css index 4755c12..ecf322f 100644 --- a/theme/ckeditor5-widget/widget.css +++ b/theme/ckeditor5-widget/widget.css @@ -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;