messages.css

Same filename in this branch
  1. 10 core/profiles/demo_umami/themes/umami/css/components/messages/messages.css
  2. 10 core/misc/dialog/off-canvas/css/messages.css
  3. 10 core/themes/olivero/css/components/messages.css
  4. 10 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. 11.x core/profiles/demo_umami/themes/umami/css/components/messages/messages.css
  18. 11.x core/misc/dialog/off-canvas/css/messages.css
  19. 11.x core/themes/olivero/css/components/messages.css
  20. 11.x core/themes/claro/css/components/messages.css
  21. 11.x core/themes/starterkit_theme/css/components/messages.css
/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * Messages.
 *
 * @todo revisit this after https://www.drupal.org/project/drupal/issues/3078400
 *   has been resolved.
 */

:root {
  --messages-bg-color: #353641;
  --messages-fg-color: var(--color-white);
  --messages-border-radius: 2px;
  --messages-border-width: 0.3125rem;
  --messages--status-color: #42a877;
  --messages--warning-color: #e0ac00;
  --messages--error-color: #e34f4f;
  --messages__link-color: var(--color-sunglow);
  --messages__link--hover-color: var(--color-white);
  --messages__icon-size: 1rem;
  --messages__text-margin: calc(var(--messages__icon-size) + var(--space-l));
}

.messages-list {
  margin-block: calc(var(--space-m) + var(--space-l));
  padding: 0;
  list-style: none;
}

.field .messages-list,
.form-wrapper .messages-list {
  margin-block-end: 0;
}

.messages {
  overflow: auto; /* Required to prevent text clipping. */
  box-sizing: border-box;
  margin-block: var(--space-m);
  padding-block: var(--space-l) 2rem;
  padding-inline: calc(var(--space-l) - 0.3125rem) var(--space-l);
  color: var(--messages-fg-color);
  border-width: 0 0 0 var(--messages-border-width); /* LTR */
  border-style: solid;
  border-color: var(--messages-bg-color);
  border-radius: var(--messages-border-radius);
  background-color: var(--messages-bg-color);
}

.messages a {
  -webkit-text-decoration: underline;
  text-decoration: underline;
  color: var(--messages__link-color);
}

.messages a:hover {
  color: var(--messages__link--hover-color);
}

.messages pre {
  margin: 0;
}

[dir="rtl"] .messages {
  border-right-width: var(--messages-border-width);
  border-left-width: 0;
}

.messages--error {
  border-color: var(--messages--error-color);
}

.messages--error .messages__header {
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 14 14'%3e%3cpath d='M3 11.193L11.45 3' stroke='%23e34f4f' stroke-width='2'/%3e%3ccircle cx='7' cy='7' r='6' fill='none' stroke='%23e34f4f' stroke-width='2'/%3e%3c/svg%3e") no-repeat center left;
}

.messages--status {
  border-color: var(--messages--status-color);
}

.messages--status .messages__header {
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 13'%3e%3cpath d='M2 6.571L5.6 10 14 2' fill='none' stroke='%2342a877' stroke-width='3'/%3e%3c/svg%3e") no-repeat center left;
}

.messages--warning {
  border-color: var(--messages--warning-color);
}

.messages--warning .messages__header {
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 4 14' fill='%23e0ac00'%3e%3cpath d='M.5 0h3v9h-3z'/%3e%3ccircle cx='2' cy='12.5' r='1.5'/%3e%3c/svg%3e") no-repeat center left;
}

.messages__title {
  margin-block: 0;
  margin-inline: var(--messages__text-margin) 0;
  font-size: var(--font-size-base);
}

.messages__header {
  display: flex;
  align-items: center;
  margin-block-end: var(--space-m);
}

[dir="rtl"] .messages__header {
  background-position: center right;
}

@media screen and (min-width: 48rem) {
  .messages__content {
    margin-inline-start: var(--messages__text-margin);
  }
}

.messages__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.messages__item + .messages__item {
  margin-block-start: var(--space-s);
}

File

core/themes/claro/css/components/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. * Messages.
  9. *
  10. * @todo revisit this after https://www.drupal.org/project/drupal/issues/3078400
  11. * has been resolved.
  12. */
  13. :root {
  14. --messages-bg-color: #353641;
  15. --messages-fg-color: var(--color-white);
  16. --messages-border-radius: 2px;
  17. --messages-border-width: 0.3125rem;
  18. --messages--status-color: #42a877;
  19. --messages--warning-color: #e0ac00;
  20. --messages--error-color: #e34f4f;
  21. --messages__link-color: var(--color-sunglow);
  22. --messages__link--hover-color: var(--color-white);
  23. --messages__icon-size: 1rem;
  24. --messages__text-margin: calc(var(--messages__icon-size) + var(--space-l));
  25. }
  26. .messages-list {
  27. margin-block: calc(var(--space-m) + var(--space-l));
  28. padding: 0;
  29. list-style: none;
  30. }
  31. .field .messages-list,
  32. .form-wrapper .messages-list {
  33. margin-block-end: 0;
  34. }
  35. .messages {
  36. overflow: auto; /* Required to prevent text clipping. */
  37. box-sizing: border-box;
  38. margin-block: var(--space-m);
  39. padding-block: var(--space-l) 2rem;
  40. padding-inline: calc(var(--space-l) - 0.3125rem) var(--space-l);
  41. color: var(--messages-fg-color);
  42. border-width: 0 0 0 var(--messages-border-width); /* LTR */
  43. border-style: solid;
  44. border-color: var(--messages-bg-color);
  45. border-radius: var(--messages-border-radius);
  46. background-color: var(--messages-bg-color);
  47. }
  48. .messages a {
  49. -webkit-text-decoration: underline;
  50. text-decoration: underline;
  51. color: var(--messages__link-color);
  52. }
  53. .messages a:hover {
  54. color: var(--messages__link--hover-color);
  55. }
  56. .messages pre {
  57. margin: 0;
  58. }
  59. [dir="rtl"] .messages {
  60. border-right-width: var(--messages-border-width);
  61. border-left-width: 0;
  62. }
  63. .messages--error {
  64. border-color: var(--messages--error-color);
  65. }
  66. .messages--error .messages__header {
  67. background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 14 14'%3e%3cpath d='M3 11.193L11.45 3' stroke='%23e34f4f' stroke-width='2'/%3e%3ccircle cx='7' cy='7' r='6' fill='none' stroke='%23e34f4f' stroke-width='2'/%3e%3c/svg%3e") no-repeat center left;
  68. }
  69. .messages--status {
  70. border-color: var(--messages--status-color);
  71. }
  72. .messages--status .messages__header {
  73. background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 13'%3e%3cpath d='M2 6.571L5.6 10 14 2' fill='none' stroke='%2342a877' stroke-width='3'/%3e%3c/svg%3e") no-repeat center left;
  74. }
  75. .messages--warning {
  76. border-color: var(--messages--warning-color);
  77. }
  78. .messages--warning .messages__header {
  79. background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 4 14' fill='%23e0ac00'%3e%3cpath d='M.5 0h3v9h-3z'/%3e%3ccircle cx='2' cy='12.5' r='1.5'/%3e%3c/svg%3e") no-repeat center left;
  80. }
  81. .messages__title {
  82. margin-block: 0;
  83. margin-inline: var(--messages__text-margin) 0;
  84. font-size: var(--font-size-base);
  85. }
  86. .messages__header {
  87. display: flex;
  88. align-items: center;
  89. margin-block-end: var(--space-m);
  90. }
  91. [dir="rtl"] .messages__header {
  92. background-position: center right;
  93. }
  94. @media screen and (min-width: 48rem) {
  95. .messages__content {
  96. margin-inline-start: var(--messages__text-margin);
  97. }
  98. }
  99. .messages__list {
  100. margin: 0;
  101. padding: 0;
  102. list-style: none;
  103. }
  104. .messages__item + .messages__item {
  105. margin-block-start: var(--space-s);
  106. }

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