layout-builder.css

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/css/components/layout_builder/layout-builder.css
  2. 11.x core/modules/layout_builder/css/layout-builder.css
  3. 11.x core/modules/navigation/css/base/layout-builder.css
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/components/layout_builder/layout-builder.css
  2. 9 core/themes/stable9/css/layout_builder/layout-builder.css
  3. 9 core/themes/stable/css/layout_builder/layout-builder.css
  4. 9 core/modules/layout_builder/css/layout-builder.css
  5. 8.9.x core/profiles/demo_umami/themes/umami/css/components/layout_builder/layout-builder.css
  6. 8.9.x core/themes/stable/css/layout_builder/layout-builder.css
  7. 8.9.x core/modules/layout_builder/css/layout-builder.css
  8. 10 core/profiles/demo_umami/themes/umami/css/components/layout_builder/layout-builder.css
  9. 10 core/themes/stable9/css/layout_builder/layout-builder.css
  10. 10 core/modules/layout_builder/css/layout-builder.css
  11. 10 core/modules/navigation/css/base/layout-builder.css
.layout-builder {
  padding: 1.5em 1.5em 0.5em;
  border: 3px solid #2f91da;
  background-color: #fff;
}

.layout-builder__add-section {
  width: 100%;
  margin-bottom: 1.5em;
  padding: 1.5em 0;
  text-align: center;
  outline: 2px dashed #979797;
  background-color: #f7f7f7;
}

.layout-builder__link--add {
  padding-left: 1.3em; /* LTR */
  color: #686868;
  border-bottom: none;
  background: url(../../../../misc/icons/787878/plus.svg) transparent center left / 1em no-repeat; /* LTR */
}

[dir="rtl"] .layout-builder__link--add {
  padding-right: 1.3em;
  padding-left: 0;
  background-position-x: right;
}

.layout-builder__link--add:hover,
.layout-builder__link--add:active,
.layout-builder__link--add:focus {
  color: #000;
  border-bottom-style: none;
}

.layout-builder__section {
  margin-bottom: 1.5em;
}

.layout-builder__section .ui-sortable-helper {
  outline: 2px solid #f7f7f7;
  background-color: #fff;
}

.layout-builder__section .ui-state-drop {
  margin: 20px;
  padding: 30px;
  outline: 2px dashed #fedb60;
  background-color: #ffd;
}

.layout-builder__region {
  outline: 2px dashed #2f91da;
}

.layout-builder__add-block {
  padding: 1.5em 0;
  text-align: center;
  background-color: #eff6fc;
}

.layout-builder__link--remove {
  position: relative;
  z-index: 2;
  display: inline-block;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  margin-right: 6px; /* LTR */
  margin-left: -10px; /* LTR */
  padding: 0;
  white-space: nowrap;
  text-indent: -9999px;
  border: 1px solid #ccc;
  border-radius: 26px;
  background: url(../../../../misc/icons/bebebe/ex.svg) #fff center center / 16px 16px no-repeat;
  font-size: 1rem;
}

[dir="rtl"] .layout-builder__link--remove {
  margin-right: -10px;
  margin-left: 6px;
}

.layout-builder__link--remove:hover {
  background-image: url(../../../../misc/icons/787878/ex.svg);
}

.layout-builder-block {
  padding: 1.5em;
  cursor: move;
  background-color: #fff;
}

.layout-builder-block [tabindex="-1"] {
  pointer-events: none;
}

.layout-builder__message .messages {
  background-repeat: no-repeat;
}
.layout-builder__message--defaults .messages {
  background-image: url("../../../../misc/icons/73b355/globe.svg");
}
.layout-builder__message--overrides .messages {
  background-image: url("../../../../misc/icons/73b355/location.svg");
}

.layout-builder-block__content-preview-placeholder-label {
  margin: 0;
  text-align: center;
  font-size: 1.429em;
  line-height: 1.4;
}

.layout-builder--content-preview-disabled .layout-builder-block {
  margin: 0;
  border-bottom: 2px dashed #979797;
}

#drupal-off-canvas .layout-selection li {
  display: block;
  padding-bottom: 1em;
}

#drupal-off-canvas .layout-selection li a {
  display: block;
  padding-top: 0.55em;
}

#drupal-off-canvas .inline-block-create-button,
#drupal-off-canvas .inline-block-list__item {
  margin: 0 -20px;
  background-color: #444;
}

#drupal-off-canvas .inline-block-create-button:hover,
#drupal-off-canvas .inline-block-list__item:hover {
  background-color: #333;
}

#drupal-off-canvas .inline-block-list {
  margin-bottom: 15px;
}

#drupal-off-canvas .inline-block-list__item {
  display: block;
  padding: 15px 0 15px 25px;
}

.layout-builder__add-section.is-layout-builder-highlighted {
  margin-bottom: calc(1.5em - 8px);
  outline: none;
}
.layout-builder__layout.is-layout-builder-highlighted,
.layout-builder-block.is-layout-builder-highlighted,
.layout-builder__add-block.is-layout-builder-highlighted {
  position: relative;
  z-index: 1;
  margin: -4px -2px;
}
.layout-builder__add-block.is-layout-builder-highlighted,
.layout-builder__add-section.is-layout-builder-highlighted,
.layout-builder__layout.is-layout-builder-highlighted::before,
.layout-builder__layout.is-layout-builder-highlighted,
.layout-builder-block.is-layout-builder-highlighted {
  border: 4px solid #000;
}

/* Highlight the active block in the Move Block dialog. */
#drupal-off-canvas .layout-builder-components-table__block-label--current {
  padding-left: 17px;
  border-left: solid 5px;
}

/**
 * @todo remove in https://www.drupal.org/project/drupal/issues/3042127
 *   This rule ensures the row weight dropdowns in the Move Block dialog
 *   maintain the background color of their container when they are hovered
 *   over or are inside the active row.
 */
#drupal-off-canvas .layout-builder-components-table__row .form-item {
  background-color: transparent;
}

.layout-builder__region-label,
.layout-builder__section-label {
  display: none;
}

.layout-builder--move-blocks-active .layout-builder__region-label {
  display: block;
}

.layout-builder--move-blocks-active .layout-builder__section-label {
  display: inline;
}

.layout__region-info {
  padding: 0.5em;
  text-align: center;
  border-bottom: 2px dashed #979797;
}

/**
 * Remove "You have unsaved changes" warning because Layout Builder always has
 * unsaved changes until "Save layout" is submitted.
 * @todo create issue for todo.
 */
.layout-builder-components-table .tabledrag-changed-warning {
  display: none !important;
}

File

core/themes/stable9/css/layout_builder/layout-builder.css

View source
  1. .layout-builder {
  2. padding: 1.5em 1.5em 0.5em;
  3. border: 3px solid #2f91da;
  4. background-color: #fff;
  5. }
  6. .layout-builder__add-section {
  7. width: 100%;
  8. margin-bottom: 1.5em;
  9. padding: 1.5em 0;
  10. text-align: center;
  11. outline: 2px dashed #979797;
  12. background-color: #f7f7f7;
  13. }
  14. .layout-builder__link--add {
  15. padding-left: 1.3em; /* LTR */
  16. color: #686868;
  17. border-bottom: none;
  18. background: url(../../../../misc/icons/787878/plus.svg) transparent center left / 1em no-repeat; /* LTR */
  19. }
  20. [dir="rtl"] .layout-builder__link--add {
  21. padding-right: 1.3em;
  22. padding-left: 0;
  23. background-position-x: right;
  24. }
  25. .layout-builder__link--add:hover,
  26. .layout-builder__link--add:active,
  27. .layout-builder__link--add:focus {
  28. color: #000;
  29. border-bottom-style: none;
  30. }
  31. .layout-builder__section {
  32. margin-bottom: 1.5em;
  33. }
  34. .layout-builder__section .ui-sortable-helper {
  35. outline: 2px solid #f7f7f7;
  36. background-color: #fff;
  37. }
  38. .layout-builder__section .ui-state-drop {
  39. margin: 20px;
  40. padding: 30px;
  41. outline: 2px dashed #fedb60;
  42. background-color: #ffd;
  43. }
  44. .layout-builder__region {
  45. outline: 2px dashed #2f91da;
  46. }
  47. .layout-builder__add-block {
  48. padding: 1.5em 0;
  49. text-align: center;
  50. background-color: #eff6fc;
  51. }
  52. .layout-builder__link--remove {
  53. position: relative;
  54. z-index: 2;
  55. display: inline-block;
  56. box-sizing: border-box;
  57. width: 26px;
  58. height: 26px;
  59. margin-right: 6px; /* LTR */
  60. margin-left: -10px; /* LTR */
  61. padding: 0;
  62. white-space: nowrap;
  63. text-indent: -9999px;
  64. border: 1px solid #ccc;
  65. border-radius: 26px;
  66. background: url(../../../../misc/icons/bebebe/ex.svg) #fff center center / 16px 16px no-repeat;
  67. font-size: 1rem;
  68. }
  69. [dir="rtl"] .layout-builder__link--remove {
  70. margin-right: -10px;
  71. margin-left: 6px;
  72. }
  73. .layout-builder__link--remove:hover {
  74. background-image: url(../../../../misc/icons/787878/ex.svg);
  75. }
  76. .layout-builder-block {
  77. padding: 1.5em;
  78. cursor: move;
  79. background-color: #fff;
  80. }
  81. .layout-builder-block [tabindex="-1"] {
  82. pointer-events: none;
  83. }
  84. .layout-builder__message .messages {
  85. background-repeat: no-repeat;
  86. }
  87. .layout-builder__message--defaults .messages {
  88. background-image: url("../../../../misc/icons/73b355/globe.svg");
  89. }
  90. .layout-builder__message--overrides .messages {
  91. background-image: url("../../../../misc/icons/73b355/location.svg");
  92. }
  93. .layout-builder-block__content-preview-placeholder-label {
  94. margin: 0;
  95. text-align: center;
  96. font-size: 1.429em;
  97. line-height: 1.4;
  98. }
  99. .layout-builder--content-preview-disabled .layout-builder-block {
  100. margin: 0;
  101. border-bottom: 2px dashed #979797;
  102. }
  103. #drupal-off-canvas .layout-selection li {
  104. display: block;
  105. padding-bottom: 1em;
  106. }
  107. #drupal-off-canvas .layout-selection li a {
  108. display: block;
  109. padding-top: 0.55em;
  110. }
  111. #drupal-off-canvas .inline-block-create-button,
  112. #drupal-off-canvas .inline-block-list__item {
  113. margin: 0 -20px;
  114. background-color: #444;
  115. }
  116. #drupal-off-canvas .inline-block-create-button:hover,
  117. #drupal-off-canvas .inline-block-list__item:hover {
  118. background-color: #333;
  119. }
  120. #drupal-off-canvas .inline-block-list {
  121. margin-bottom: 15px;
  122. }
  123. #drupal-off-canvas .inline-block-list__item {
  124. display: block;
  125. padding: 15px 0 15px 25px;
  126. }
  127. .layout-builder__add-section.is-layout-builder-highlighted {
  128. margin-bottom: calc(1.5em - 8px);
  129. outline: none;
  130. }
  131. .layout-builder__layout.is-layout-builder-highlighted,
  132. .layout-builder-block.is-layout-builder-highlighted,
  133. .layout-builder__add-block.is-layout-builder-highlighted {
  134. position: relative;
  135. z-index: 1;
  136. margin: -4px -2px;
  137. }
  138. .layout-builder__add-block.is-layout-builder-highlighted,
  139. .layout-builder__add-section.is-layout-builder-highlighted,
  140. .layout-builder__layout.is-layout-builder-highlighted::before,
  141. .layout-builder__layout.is-layout-builder-highlighted,
  142. .layout-builder-block.is-layout-builder-highlighted {
  143. border: 4px solid #000;
  144. }
  145. /* Highlight the active block in the Move Block dialog. */
  146. #drupal-off-canvas .layout-builder-components-table__block-label--current {
  147. padding-left: 17px;
  148. border-left: solid 5px;
  149. }
  150. /**
  151. * @todo remove in https://www.drupal.org/project/drupal/issues/3042127
  152. * This rule ensures the row weight dropdowns in the Move Block dialog
  153. * maintain the background color of their container when they are hovered
  154. * over or are inside the active row.
  155. */
  156. #drupal-off-canvas .layout-builder-components-table__row .form-item {
  157. background-color: transparent;
  158. }
  159. .layout-builder__region-label,
  160. .layout-builder__section-label {
  161. display: none;
  162. }
  163. .layout-builder--move-blocks-active .layout-builder__region-label {
  164. display: block;
  165. }
  166. .layout-builder--move-blocks-active .layout-builder__section-label {
  167. display: inline;
  168. }
  169. .layout__region-info {
  170. padding: 0.5em;
  171. text-align: center;
  172. border-bottom: 2px dashed #979797;
  173. }
  174. /**
  175. * Remove "You have unsaved changes" warning because Layout Builder always has
  176. * unsaved changes until "Save layout" is submitted.
  177. * @todo create issue for todo.
  178. */
  179. .layout-builder-components-table .tabledrag-changed-warning {
  180. display: none !important;
  181. }

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