@ckeditor/ckeditor5-image
Version:
Image feature for CKEditor 5.
52 lines (43 loc) • 1.37 kB
CSS
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";
:root {
--ck-color-image-caption-background: hsl(0, 0%, 97%);
--ck-color-image-caption-text: hsl(0, 0%, 20%);
--ck-color-image-caption-highlighted-background: hsl(52deg 100% 50%);
}
/* Content styles */
.ck-content .image > figcaption {
display: table-caption;
caption-side: bottom;
word-break: break-word;
color: var(--ck-color-image-caption-text);
background-color: var(--ck-color-image-caption-background);
padding: .6em;
font-size: .75em;
outline-offset: -1px;
/* Improve placeholder rendering in high-constrast mode (https://github.com/ckeditor/ckeditor5/issues/14907). */
@media (forced-colors: active) {
background-color: unset;
color: unset;
}
}
/* Editing styles */
.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {
@mixin ck-media-default-colors {
animation: ck-image-caption-highlight .6s ease-out;
}
@media (prefers-reduced-motion: reduce) {
animation: none;
}
}
@keyframes ck-image-caption-highlight {
0% {
background-color: var(--ck-color-image-caption-highlighted-background);
}
100% {
background-color: var(--ck-color-image-caption-background);
}
}