ckeditor.drupalmedia.css 959 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. }