drupalmedia.css

Same filename in other branches
  1. 10 core/modules/ckeditor5/css/drupalmedia.css
  2. 11.x core/modules/ckeditor5/css/drupalmedia.css

Styles for the Drupal Media in CKEditor 5.

Most of these styles are written to match those in the CKEditor 5 image plugin to provide a consistent editing experience.

File

core/modules/ckeditor5/css/drupalmedia.css

View source
  1. /**
  2. * @file
  3. * Styles for the Drupal Media in CKEditor 5.
  4. *
  5. * Most of these styles are written to match those in the CKEditor 5 image
  6. * plugin to provide a consistent editing experience.
  7. */
  8. .ck .drupal-media {
  9. position: relative;
  10. display: table;
  11. clear: both;
  12. min-width: 50px;
  13. margin: 0.9em auto;
  14. text-align: center;
  15. }
  16. .ck-content .drupal-media img {
  17. display: block;
  18. min-width: 100%;
  19. max-width: 100%;
  20. margin: 0 auto;
  21. }
  22. .ck-content .drupal-media > figcaption {
  23. display: table-caption;
  24. padding: 0.6em;
  25. caption-side: bottom;
  26. word-break: break-word;
  27. color: hsl(0, 0%, 20%);
  28. outline-offset: -1px;
  29. background-color: hsl(0, 0%, 97%);
  30. font-size: 0.75em;
  31. }
  32. .ck.ck-editor__editable .drupal-media__caption_highlighted {
  33. animation: drupal-media-caption-highlight 0.6s ease-out;
  34. }
  35. @keyframes drupal-media-caption-highlight {
  36. 0% {
  37. background-color: hsl(52, 100%, 50%);
  38. }
  39. 100% {
  40. background-color: hsl(0, 0%, 97%);
  41. }
  42. }
  43. .ck .drupal-media__metadata-error {
  44. position: absolute;
  45. top: 8px;
  46. right: 8px;
  47. width: 28px;
  48. height: 28px;
  49. border: 1px solid #e29700;
  50. border-radius: 50%;
  51. background: #fdf8ed;
  52. }
  53. .ck .drupal-media__metadata-error-icon {
  54. display: block;
  55. width: 28px;
  56. height: 28px;
  57. background: url("../../../misc/icons/e29700/warning.svg") no-repeat center 4px;
  58. background-size: 18px;
  59. }
  60. .ck .drupal-media__metadata-error .ck-tooltip {
  61. display: block;
  62. overflow: visible;
  63. }
  64. .ck .drupal-media__metadata-error:hover .ck-tooltip {
  65. visibility: visible;
  66. opacity: 1;
  67. }
  68. .ck .drupal-media__metadata-error:hover .ck-tooltip__text {
  69. display: block;
  70. width: 240px;
  71. }
  72. .ck.ck-media-alternative-text-form {
  73. min-width: 300px;
  74. max-width: 600px;
  75. padding: 0;
  76. }
  77. .ck.ck-media-alternative-text-form .ck-labeled-field-view,
  78. .ck.ck-media-alternative-text-form .ck-media-alternative-text-form__default-alt-text {
  79. margin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);
  80. }
  81. .ck.ck-media-alternative-text-form .ck-labeled-field-view .ck-input-text {
  82. width: 100%;
  83. }
  84. .ck.ck-media-alternative-text-form .ck-button {
  85. width: 50%;
  86. margin: var(--ck-spacing-large) 0 0 0;
  87. padding: var(--ck-spacing-standard);
  88. border: 0;
  89. border-top: 1px solid var(--ck-color-base-border);
  90. border-radius: 0;
  91. }
  92. .ck.ck .ck-media-alternative-text-form__default-alt-text-label {
  93. font-weight: bold;
  94. }
  95. .ck.ck .ck-media-alternative-text-form__default-alt-text-label,
  96. .ck.ck .ck-media-alternative-text-form__default-alt-text-value {
  97. white-space: normal;
  98. }

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