ckeditor.drupalimagecaption.css

Same filename in this branch
  1. 9 core/themes/stable9/css/ckeditor/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css
  2. 9 core/themes/stable/css/ckeditor/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css
Same filename in other branches
  1. 8.9.x core/themes/stable/css/ckeditor/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css
  2. 8.9.x core/modules/ckeditor/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css

Image Caption: overrides to make centered alignment work inside CKEditor.

File

core/modules/ckeditor/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css

View source
  1. /**
  2. * @file
  3. * Image Caption: overrides to make centered alignment work inside CKEditor.
  4. */
  5. /**
  6. * Since .align-center is set on the non-captioned image's parent block element
  7. * in CKEditor, the image must be centered separately.
  8. */
  9. p[data-widget="image"].align-center {
  10. text-align: center;
  11. }
  12. /**
  13. * Since .align-center is set on captioned widget's wrapper element in CKEditor,
  14. * the alignment of internals must be set separately.
  15. */
  16. div[data-cke-widget-wrapper].align-center > figure[data-widget="image"] {
  17. margin-right: auto;
  18. margin-left: auto;
  19. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.