layout-builder.css

Same filename in this branch
  1. 8.9.x core/profiles/demo_umami/themes/umami/css/components/layout_builder/layout-builder.css
  2. 8.9.x core/modules/layout_builder/css/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. 10 core/profiles/demo_umami/themes/umami/css/components/layout_builder/layout-builder.css
  6. 10 core/themes/stable9/css/layout_builder/layout-builder.css
  7. 10 core/modules/layout_builder/css/layout-builder.css
  8. 11.x core/profiles/demo_umami/themes/umami/css/components/layout_builder/layout-builder.css
  9. 11.x core/themes/stable9/css/layout_builder/layout-builder.css
  10. 11.x core/modules/layout_builder/css/layout-builder.css
  11. 11.x core/modules/navigation/css/base/layout-builder.css
  12. 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 {
  display: block;
  padding: 24px;
  padding-left: 44px;
  color: #eee;
  border-bottom: 1px solid #333;
  background: url(../../../../misc/icons/bebebe/plus.svg) transparent 16px no-repeat;
  font-size: 16px;
}

#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/stable/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. display: block;
  113. padding: 24px;
  114. padding-left: 44px;
  115. color: #eee;
  116. border-bottom: 1px solid #333;
  117. background: url(../../../../misc/icons/bebebe/plus.svg) transparent 16px no-repeat;
  118. font-size: 16px;
  119. }
  120. #drupal-off-canvas .inline-block-create-button,
  121. #drupal-off-canvas .inline-block-list__item {
  122. margin: 0 -20px;
  123. background-color: #444;
  124. }
  125. #drupal-off-canvas .inline-block-create-button:hover,
  126. #drupal-off-canvas .inline-block-list__item:hover {
  127. background-color: #333;
  128. }
  129. #drupal-off-canvas .inline-block-list {
  130. margin-bottom: 15px;
  131. }
  132. #drupal-off-canvas .inline-block-list__item {
  133. display: block;
  134. padding: 15px 0 15px 25px;
  135. }
  136. .layout-builder__add-section.is-layout-builder-highlighted {
  137. margin-bottom: calc(1.5em - 8px);
  138. outline: none;
  139. }
  140. .layout-builder__layout.is-layout-builder-highlighted,
  141. .layout-builder-block.is-layout-builder-highlighted,
  142. .layout-builder__add-block.is-layout-builder-highlighted {
  143. position: relative;
  144. z-index: 1;
  145. margin: -4px -2px;
  146. }
  147. .layout-builder__add-block.is-layout-builder-highlighted,
  148. .layout-builder__add-section.is-layout-builder-highlighted,
  149. .layout-builder__layout.is-layout-builder-highlighted:before,
  150. .layout-builder__layout.is-layout-builder-highlighted,
  151. .layout-builder-block.is-layout-builder-highlighted {
  152. border: 4px solid #000;
  153. }
  154. /* Highlight the active block in the Move Block dialog. */
  155. #drupal-off-canvas .layout-builder-components-table__block-label--current {
  156. padding-left: 17px;
  157. border-left: solid 5px;
  158. }
  159. /**
  160. * @todo remove in https://www.drupal.org/project/drupal/issues/3042127
  161. * This rule ensures the row weight dropdowns in the Move Block dialog
  162. * maintain the background color of their container when they are hovered
  163. * over or are inside the active row.
  164. */
  165. #drupal-off-canvas .layout-builder-components-table__row .form-item {
  166. background-color: transparent;
  167. }
  168. .layout-builder__region-label,
  169. .layout-builder__section-label {
  170. display: none;
  171. }
  172. .layout-builder--move-blocks-active .layout-builder__region-label {
  173. display: block;
  174. }
  175. .layout-builder--move-blocks-active .layout-builder__section-label {
  176. display: inline;
  177. }
  178. .layout__region-info {
  179. padding: 0.5em;
  180. text-align: center;
  181. border-bottom: 2px dashed #979797;
  182. }
  183. /**
  184. * Remove "You have unsaved changes" warning because Layout Builder always has
  185. * unsaved changes until "Save layout" is submitted.
  186. * @todo create issue for todo.
  187. */
  188. .layout-builder-components-table .tabledrag-changed-warning {
  189. display: none !important;
  190. }

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