Skip to content

Commit

Permalink
Fixed z-index of floating images next to a document list.
Browse files Browse the repository at this point in the history
  • Loading branch information
niegowski committed Oct 3, 2023
1 parent ca7040e commit a0586a9
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions packages/ckeditor5-image/theme/image.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,42 @@
text-overflow: ellipsis;
}


/*
* Make sure the selected inline image always stays on top of its siblings.
* See https://github.com/ckeditor/ckeditor5/issues/9108.
* See https://github.com/ckeditor/ckeditor5/issues/15115.
*/
& .image.ck-widget_selected {
& .image {
z-index: 1;

/*
* Make sure the selected image always stays on top of its siblings.
* See https://github.com/ckeditor/ckeditor5/issues/9108.
*/
&.ck-widget_selected {
z-index: 2;
}
}

& .image-inline.ck-widget_selected {
/*
* See https://github.com/ckeditor/ckeditor5/issues/15115.
*/
& .image-inline {
z-index: 1;

/*
* Make sure the native browser selection style is not displayed.
* Inline image widgets have their own styles for the selected state and
* leaving this up to the browser is asking for a visual collision.
* Make sure the selected inline image always stays on top of its siblings.
* See https://github.com/ckeditor/ckeditor5/issues/9108.
*/
& ::selection {
display: none;
&.ck-widget_selected {
z-index: 2;

/*
* Make sure the native browser selection style is not displayed.
* Inline image widgets have their own styles for the selected state and
* leaving this up to the browser is asking for a visual collision.
*/
& ::selection {
display: none;
}
}
}

Expand Down

0 comments on commit a0586a9

Please sign in to comment.