messages.css

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/css/components/messages/messages.css
  2. 11.x core/themes/olivero/css/components/messages.css
  3. 11.x core/themes/claro/css/components/messages.css
  4. 11.x core/themes/starterkit_theme/css/components/messages.css
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/components/messages/messages.css
  2. 9 core/themes/olivero/css/components/messages.css
  3. 9 core/themes/seven/css/components/messages.css
  4. 9 core/themes/seven/css/classy/components/messages.css
  5. 9 core/themes/claro/css/components/messages.css
  6. 9 core/themes/bartik/css/components/messages.css
  7. 9 core/themes/bartik/css/classy/components/messages.css
  8. 9 core/themes/starterkit_theme/css/components/messages.css
  9. 9 core/themes/classy/css/components/messages.css
  10. 8.9.x core/profiles/demo_umami/themes/umami/css/components/messages/messages.css
  11. 8.9.x core/themes/seven/css/components/messages.css
  12. 8.9.x core/themes/seven/css/classy/components/messages.css
  13. 8.9.x core/themes/claro/css/components/messages.css
  14. 8.9.x core/themes/bartik/css/components/messages.css
  15. 8.9.x core/themes/bartik/css/classy/components/messages.css
  16. 8.9.x core/themes/classy/css/components/messages.css
  17. 10 core/profiles/demo_umami/themes/umami/css/components/messages/messages.css
  18. 10 core/misc/dialog/off-canvas/css/messages.css
  19. 10 core/themes/olivero/css/components/messages.css
  20. 10 core/themes/claro/css/components/messages.css
  21. 10 core/themes/starterkit_theme/css/components/messages.css

Styling for messages in the off-canvas dialog.

@internal

File

core/misc/dialog/off-canvas/css/messages.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Styling for messages in the off-canvas dialog.
  10. *
  11. * @internal
  12. */
  13. #drupal-off-canvas-wrapper {
  14. --off-canvas-messages-icon-size: 1.25rem;
  15. --off-canvas-messages-background-color: #f3faef;
  16. --off-canvas-messages-text-color-status: #325e1c;
  17. --off-canvas-messages-text-color-warning: #734c00;
  18. --off-canvas-messages-text-color-error: #a51b00;
  19. --off-canvas-messages-icon-status: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2373b355'%3e%3cpath d='M6.464 13.676c-.194.194-.513.194-.707 0l-4.96-4.955c-.194-.193-.194-.513 0-.707l1.405-1.407c.194-.195.512-.195.707 0l2.849 2.848c.194.193.513.193.707 0l6.629-6.626c.195-.194.514-.194.707 0l1.404 1.404c.193.194.193.513 0 .707l-8.741 8.736z'/%3e%3c/svg%3e");
  20. --off-canvas-messages-icon-warning: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e29700'%3e%3cpath d='M14.66 12.316l-5.316-10.633c-.738-1.476-1.946-1.476-2.685 0l-5.317 10.633c-.738 1.477.008 2.684 1.658 2.684h10.002c1.65 0 2.396-1.207 1.658-2.684zm-7.66-8.316h2.002v5h-2.002v-5zm2.252 8.615c0 .344-.281.625-.625.625h-1.25c-.345 0-.626-.281-.626-.625v-1.239c0-.344.281-.625.626-.625h1.25c.344 0 .625.281.625.625v1.239z'/%3e%3c/svg%3e");
  21. --off-canvas-messages-icon-error: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e32700'%3e%3cpath d='M8.002 1c-3.868 0-7.002 3.134-7.002 7s3.134 7 7.002 7c3.865 0 7-3.134 7-7s-3.135-7-7-7zm4.025 9.284c.062.063.1.149.1.239 0 .091-.037.177-.1.24l-1.262 1.262c-.064.062-.15.1-.24.1s-.176-.036-.24-.1l-2.283-2.283-2.286 2.283c-.064.062-.15.1-.24.1s-.176-.036-.24-.1l-1.261-1.262c-.063-.062-.1-.148-.1-.24 0-.088.036-.176.1-.238l2.283-2.285-2.283-2.284c-.063-.064-.1-.15-.1-.24s.036-.176.1-.24l1.262-1.262c.063-.063.149-.1.24-.1.089 0 .176.036.24.1l2.285 2.284 2.283-2.284c.064-.063.15-.1.24-.1s.176.036.24.1l1.262 1.262c.062.063.1.149.1.24 0 .089-.037.176-.1.24l-2.283 2.284 2.283 2.284z'/%3e%3c/svg%3e");
  22. }
  23. #drupal-off-canvas-wrapper .messages {
  24. position: relative; /* Anchor ::before pseudo-element. */
  25. margin-top: calc(2 * var(--off-canvas-vertical-spacing-unit));
  26. padding: calc(2 * var(--off-canvas-vertical-spacing-unit));
  27. padding-inline-start: calc(2 * var(--off-canvas-messages-icon-size)); /* Room for icon. */
  28. border: solid 1px transparent;
  29. background-color: var(--off-canvas-messages-background-color);
  30. /* Icon. */
  31. }
  32. #drupal-off-canvas-wrapper .messages::before {
  33. position: absolute;
  34. top: 50%;
  35. display: block;
  36. width: var(--off-canvas-messages-icon-size);
  37. height: var(--off-canvas-messages-icon-size);
  38. content: "";
  39. transform: translateY(-50%);
  40. background-repeat: no-repeat;
  41. background-size: contain;
  42. inset-inline-start: 0.625rem;
  43. }
  44. @media (forced-colors: active) {
  45. #drupal-off-canvas-wrapper .messages::before {
  46. background: canvastext;
  47. -webkit-mask-repeat: no-repeat;
  48. mask-repeat: no-repeat;
  49. -webkit-mask-size: contain;
  50. mask-size: contain;
  51. }
  52. }
  53. #drupal-off-canvas-wrapper h2 {
  54. margin-top: 0;
  55. }
  56. /*
  57. * Some themes (Olivero) insert SVG icon. We use a background icon, so we
  58. * need to remove this.
  59. */
  60. #drupal-off-canvas-wrapper .messages__icon,
  61. #drupal-off-canvas-wrapper .messages__close {
  62. display: none;
  63. }
  64. #drupal-off-canvas-wrapper .messages__list {
  65. margin: 0;
  66. padding-inline-start: 1.25rem;
  67. }
  68. #drupal-off-canvas-wrapper .messages abbr {
  69. -webkit-text-decoration: none;
  70. text-decoration: none;
  71. }
  72. #drupal-off-canvas-wrapper .messages--status {
  73. color: var(--off-canvas-messages-text-color-status);
  74. }
  75. #drupal-off-canvas-wrapper .messages--status::before {
  76. background-image: var(--off-canvas-messages-icon-status);
  77. }
  78. @media (forced-colors: active) {
  79. #drupal-off-canvas-wrapper .messages--status::before {
  80. background: canvastext;
  81. -webkit-mask-image: var(--off-canvas-messages-icon-status);
  82. mask-image: var(--off-canvas-messages-icon-status);
  83. }
  84. }
  85. #drupal-off-canvas-wrapper .messages--warning {
  86. color: var(--off-canvas-messages-text-color-warning);
  87. }
  88. #drupal-off-canvas-wrapper .messages--warning::before {
  89. background-image: var(--off-canvas-messages-icon-warning);
  90. }
  91. @media (forced-colors: active) {
  92. #drupal-off-canvas-wrapper .messages--warning::before {
  93. background: canvastext;
  94. -webkit-mask-image: var(--off-canvas-messages-icon-warning);
  95. mask-image: var(--off-canvas-messages-icon-warning);
  96. }
  97. }
  98. #drupal-off-canvas-wrapper .messages--error {
  99. color: var(--off-canvas-messages-text-color-error);
  100. }
  101. #drupal-off-canvas-wrapper .messages--error::before {
  102. background-image: var(--off-canvas-messages-icon-error);
  103. }
  104. @media (forced-colors: active) {
  105. #drupal-off-canvas-wrapper .messages--error::before {
  106. background: canvastext;
  107. -webkit-mask-image: var(--off-canvas-messages-icon-error);
  108. mask-image: var(--off-canvas-messages-icon-error);
  109. }
  110. }

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