ckeditor.drupalmedia.css

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

Media embed: overrides to make focus styles and alignment work in CKEditor.

File

core/modules/ckeditor/css/plugins/drupalmedia/ckeditor.drupalmedia.css

View source
  1. /**
  2. * @file
  3. * Media embed: overrides to make focus styles and alignment work in CKEditor.
  4. */
  5. /**
  6. * Allow the drupal-media element's width to collapse to the size of its
  7. * contents so that the outline has no extra white space (margin). This
  8. * emulates the image2 plugin's styles inherited by the drupallink CKEditor
  9. * plugin.
  10. */
  11. drupal-media {
  12. display: inline-block;
  13. }
  14. /**
  15. * For center alignment, take advantage of drupal-media's inline-block
  16. * display and center it as if it were text.
  17. */
  18. .cke_widget_drupalmedia.align-center {
  19. text-align: center;
  20. }
  21. /**
  22. * Fix positioning without delete button. Can be removed with this issue:
  23. * @see https://www.drupal.org/project/drupal/issues/3074859
  24. */
  25. drupal-media .media-library-item__edit {
  26. right: 10px;
  27. }
  28. /**
  29. * Allow alignment to display in CKEditor.
  30. */
  31. drupal-media[data-align=left],
  32. drupal-media[data-align=right] {
  33. display: inline;
  34. }
  35. drupal-media[data-align=center] {
  36. display: flex;
  37. }

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