dialog.pcss.css

Same filename in other branches
  1. 8.9.x core/themes/claro/css/components/dialog.pcss.css
  2. 10 core/themes/claro/css/components/dialog.pcss.css
  3. 11.x core/themes/claro/css/components/dialog.pcss.css

Presentational styles for Drupal dialogs.

File

core/themes/claro/css/components/dialog.pcss.css

View source
  1. /**
  2. * @file
  3. * Presentational styles for Drupal dialogs.
  4. */
  5. @import "../base/variables.pcss.css";
  6. .ui-dialog {
  7. position: absolute;
  8. top: 0;
  9. left: 0;
  10. padding: 0;
  11. border: 0;
  12. border-radius: var(--jui-dialog-border-radius);
  13. background: transparent;
  14. box-shadow: var(--jui-dialog-box-shadow);
  15. }
  16. .ui-dialog:focus {
  17. outline: var(--jui-dialog--focus-outline);
  18. box-shadow: var(--jui-dialog--focus-box-shadow);
  19. }
  20. @media all and (max-width: 48em) { /* 768px */
  21. .ui-dialog:not(.ui-dialog-off-canvas) {
  22. min-width: 92%;
  23. max-width: 92%;
  24. }
  25. }
  26. .ui-dialog .ui-dialog-titlebar {
  27. position: relative;
  28. box-sizing: border-box;
  29. padding: var(--space-m) var(--jui-dialog-close-button-reserved-space) var(--space-m) var(--space-l); /* LTR */
  30. color: var(--jui-dialog-title-color);
  31. border-top-left-radius: var(--jui-dialog-border-radius);
  32. border-top-right-radius: var(--jui-dialog-border-radius);
  33. background: var(--jui-dialog-title-bg-color);
  34. line-height: calc(var(--space-m) * 2);
  35. }
  36. [dir="rtl"] .ui-dialog .ui-dialog-titlebar {
  37. padding-right: var(--space-l);
  38. padding-left: var(--jui-dialog-close-button-reserved-space);
  39. }
  40. .ui-dialog .ui-dialog-title {
  41. -webkit-font-smoothing: antialiased;
  42. font-size: var(--jui-dialog-title-font-size);
  43. font-weight: bold;
  44. }
  45. .ui-dialog .ui-dialog-titlebar-close {
  46. position: absolute;
  47. top: 50%;
  48. right: 0; /* LTR */
  49. box-sizing: border-box;
  50. width: var(--jui-dialog-close-button-size);
  51. height: var(--jui-dialog-close-button-size);
  52. margin: 0 var(--space-l);
  53. padding: 0;
  54. transition: all 0.1s;
  55. transform: translateY(-50%);
  56. border: 2px solid transparent;
  57. border-radius: var(--jui-dialog-close-button-border-radius);
  58. background: none;
  59. }
  60. [dir="rtl"] .ui-dialog .ui-dialog-titlebar-close {
  61. right: auto;
  62. left: 0;
  63. }
  64. .ui-dialog .ui-dialog-titlebar-close:hover {
  65. border-color: var(--color-white);
  66. }
  67. .ui-dialog .ui-dialog-titlebar-close:focus {
  68. border-color: var(--color-focus);
  69. outline: var(--jui-dialog--focus-outline);
  70. box-shadow: none;
  71. }
  72. .ui-dialog .ui-icon.ui-icon-closethick {
  73. width: 100%;
  74. height: 100%;
  75. margin: 0;
  76. transform: translate(-50%, -50%);
  77. background: url(../../images/icons/d3d4d9/ex.svg) no-repeat 50%;
  78. }
  79. .ui-dialog > .ui-dialog-content {
  80. overflow: auto;
  81. padding: var(--space-m) var(--space-l);
  82. color: var(--color-text);
  83. background: var(--color-white);
  84. }
  85. .ui-dialog > .ui-dialog-buttonpane {
  86. color: var(--color-text);
  87. border-bottom-right-radius: var(--jui-dialog-border-radius);
  88. border-bottom-left-radius: var(--jui-dialog-border-radius);
  89. background: var(--color-gray-050);
  90. }
  91. .ui-dialog-buttonpane .ui-dialog-buttonset {
  92. justify-content: flex-end;
  93. margin: 0 var(--space-s);
  94. }
  95. .ui-dialog .ui-dialog-buttonpane .ui-button-text-only .ui-button-text {
  96. padding: 0;
  97. }
  98. .ui-dialog .ui-dialog-content {
  99. position: static;
  100. }
  101. /* Form action buttons are moved in dialogs. Remove empty space. */
  102. .ui-dialog .ui-dialog-content .form-actions {
  103. margin: 0;
  104. padding: 0;
  105. }
  106. /**
  107. * Off-canvas styles.
  108. */
  109. .ui-dialog.ui-dialog-off-canvas .ui-widget-content.ui-dialog-content {
  110. background: none;
  111. }
  112. @media screen and (-ms-high-contrast: active) {
  113. .ui-dialog .ui-icon.ui-icon-closethick {
  114. background: none;
  115. }
  116. .ui-dialog .ui-icon.ui-icon-closethick::before,
  117. .ui-dialog .ui-icon.ui-icon-closethick::after {
  118. position: relative;
  119. display: block;
  120. width: 50%;
  121. height: 100%;
  122. content: "";
  123. }
  124. .ui-dialog .ui-icon.ui-icon-closethick::before {
  125. top: -40%;
  126. left: 60%;
  127. transform: rotate(45deg);
  128. border-bottom: 2px white solid;
  129. }
  130. .ui-dialog .ui-icon.ui-icon-closethick::after {
  131. top: -78%;
  132. left: 60%;
  133. transform: rotate(-45deg);
  134. border-top: 2px white solid;
  135. }
  136. }
  137. #drupal-off-canvas {
  138. & .form-type--boolean {
  139. margin-left: 0;
  140. }
  141. & .form-item .form-item__description {
  142. color: var(--color-gray-050);
  143. font-size: 0.75rem;
  144. }
  145. }

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