image.css

Same filename in this branch
  1. 9 core/themes/stable9/css/quickedit/editors/image.css
  2. 9 core/themes/stable/css/quickedit/editors/image.css
  3. 9 core/modules/quickedit/css/editors/image.css
Same filename in other branches
  1. 7.x modules/image/image.css
  2. 8.9.x core/themes/stable/css/image/editors/image.css
  3. 8.9.x core/modules/image/css/editors/image.css
  4. 10 core/modules/ckeditor5/css/image.css
  5. 11.x core/modules/ckeditor5/css/image.css
/* cspell:ignore switchbutton */

/* https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries */
.ck .image,
.ck .image-inline {
  --base-size: 100%;
  --breakpoint-wide: 400px;
  --breakpoint-medium: 100px;
  --is-wide: clamp(0px, var(--base-size) - var(--breakpoint-wide), 1px);
  --is-medium: calc(clamp(0px, var(--base-size) - var(--breakpoint-medium), 1px) - var(--is-wide));
  --is-small: calc(1px - (var(--is-medium) + var(--is-wide)));
}

.ck.ck-responsive-form.ck-text-alternative-form--with-decorative-toggle {
  width: auto;
}
.ck.ck-responsive-form .ck.ck-text-alternative-form__decorative-toggle,
.ck.ck-responsive-form .ck.ck-text-alternative-form__decorative-toggle .ck-switchbutton {
  width: 100%;
}

.ck .image,
.ck .image-inline {
  position: relative;
}
.ck .image-alternative-text-missing-wrapper {
  position: absolute;
  right: 10px;
  bottom: 10px;
  overflow: hidden;
  max-width:
    calc(
      (var(--is-small) * 0)
      + (var(--is-medium) * 33)
      + (var(--is-wide) * 999999)
    );
  border-left: calc((var(--is-small) * 0) + (var(--is-medium) * 3) + (var(--is-wide) * 3)) solid #ffd23f;
  border-radius: 2px;
  background: #232429;
  font-size: 14px;
}

.ck figcaption ~ .image-alternative-text-missing-wrapper {
  top: 10px;
  bottom: auto;
}

.ck .image-alternative-text-missing-wrapper .ck.ck-button {
  padding: 12px 12px 12px 8px;
  cursor: pointer;
  color: #fff;
  background: none !important; /* Override background for all states. */
}
.ck .image-alternative-text-missing-wrapper .ck.ck-button:before {
  width: 16px;
  height: 16px;
  padding-right: 8px;
  content: "";
  background: url("../icons/warning.svg") left center no-repeat;
}
.ck .image-alternative-text-missing-wrapper .ck.ck-button:after {
  display: inline-block;
  width: 12px;
  height: 12px;
  padding-left: 2rem;
  content: "";
  background: url("../icons/caret.svg") right center no-repeat;
  font-size: 18px;
  font-weight: bold;
}
.ck .image-alternative-text-missing-wrapper .ck-tooltip {
  display: block;
  overflow: visible;
}
.ck .image-alternative-text-missing-wrapper:hover .ck-tooltip {
  visibility: visible;
  opacity: 1;
}
.ck .image-alternative-text-missing-wrapper:hover .ck-tooltip__text {
  display: block;
  width: 240px;
}

File

core/modules/ckeditor5/css/image.css

View source
  1. /* cspell:ignore switchbutton */
  2. /* https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries */
  3. .ck .image,
  4. .ck .image-inline {
  5. --base-size: 100%;
  6. --breakpoint-wide: 400px;
  7. --breakpoint-medium: 100px;
  8. --is-wide: clamp(0px, var(--base-size) - var(--breakpoint-wide), 1px);
  9. --is-medium: calc(clamp(0px, var(--base-size) - var(--breakpoint-medium), 1px) - var(--is-wide));
  10. --is-small: calc(1px - (var(--is-medium) + var(--is-wide)));
  11. }
  12. .ck.ck-responsive-form.ck-text-alternative-form--with-decorative-toggle {
  13. width: auto;
  14. }
  15. .ck.ck-responsive-form .ck.ck-text-alternative-form__decorative-toggle,
  16. .ck.ck-responsive-form .ck.ck-text-alternative-form__decorative-toggle .ck-switchbutton {
  17. width: 100%;
  18. }
  19. .ck .image,
  20. .ck .image-inline {
  21. position: relative;
  22. }
  23. .ck .image-alternative-text-missing-wrapper {
  24. position: absolute;
  25. right: 10px;
  26. bottom: 10px;
  27. overflow: hidden;
  28. max-width:
  29. calc(
  30. (var(--is-small) * 0)
  31. + (var(--is-medium) * 33)
  32. + (var(--is-wide) * 999999)
  33. );
  34. border-left: calc((var(--is-small) * 0) + (var(--is-medium) * 3) + (var(--is-wide) * 3)) solid #ffd23f;
  35. border-radius: 2px;
  36. background: #232429;
  37. font-size: 14px;
  38. }
  39. .ck figcaption ~ .image-alternative-text-missing-wrapper {
  40. top: 10px;
  41. bottom: auto;
  42. }
  43. .ck .image-alternative-text-missing-wrapper .ck.ck-button {
  44. padding: 12px 12px 12px 8px;
  45. cursor: pointer;
  46. color: #fff;
  47. background: none !important; /* Override background for all states. */
  48. }
  49. .ck .image-alternative-text-missing-wrapper .ck.ck-button:before {
  50. width: 16px;
  51. height: 16px;
  52. padding-right: 8px;
  53. content: "";
  54. background: url("../icons/warning.svg") left center no-repeat;
  55. }
  56. .ck .image-alternative-text-missing-wrapper .ck.ck-button:after {
  57. display: inline-block;
  58. width: 12px;
  59. height: 12px;
  60. padding-left: 2rem;
  61. content: "";
  62. background: url("../icons/caret.svg") right center no-repeat;
  63. font-size: 18px;
  64. font-weight: bold;
  65. }
  66. .ck .image-alternative-text-missing-wrapper .ck-tooltip {
  67. display: block;
  68. overflow: visible;
  69. }
  70. .ck .image-alternative-text-missing-wrapper:hover .ck-tooltip {
  71. visibility: visible;
  72. opacity: 1;
  73. }
  74. .ck .image-alternative-text-missing-wrapper:hover .ck-tooltip__text {
  75. display: block;
  76. width: 240px;
  77. }

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