layout-builder.pcss.css

Same filename in this branch
  1. 10 core/modules/navigation/css/base/layout-builder.pcss.css
Same filename in other branches
  1. 11.x core/modules/layout_builder/css/layout-builder.pcss.css
  2. 11.x core/modules/navigation/css/base/layout-builder.pcss.css

Layout Builder UI styling.

File

core/modules/layout_builder/css/layout-builder.pcss.css

View source
  1. /**
  2. * @file
  3. * Layout Builder UI styling.
  4. */
  5. .layout-builder {
  6. padding: 1.5em 1.5em 0.5em;
  7. border: 3px solid #2f91da;
  8. background-color: #fff;
  9. }
  10. .layout-builder__add-section {
  11. width: 100%;
  12. margin-bottom: 1.5em;
  13. padding: 1.5em 0;
  14. text-align: center;
  15. outline: 2px dashed #979797;
  16. background-color: #f7f7f7;
  17. }
  18. .layout-builder__link--add {
  19. padding-inline-start: 1.3em;
  20. color: #686868;
  21. border-bottom: none;
  22. background: url(../../../misc/icons/787878/plus.svg) transparent center left / 1em no-repeat; /* LTR */
  23. &:dir(rtl) {
  24. background-position-x: right;
  25. }
  26. &:hover,
  27. &:active {
  28. color: #000;
  29. border-bottom-style: none;
  30. }
  31. }
  32. .layout-builder__section {
  33. margin-bottom: 1.5em;
  34. & .ui-sortable-helper {
  35. outline: 2px solid #f7f7f7;
  36. background-color: #fff;
  37. }
  38. & .ui-state-drop {
  39. margin: 20px;
  40. padding: 30px;
  41. outline: 2px dashed #fedb60;
  42. background-color: #ffd;
  43. }
  44. }
  45. .layout-builder__region {
  46. outline: 2px dashed #2f91da;
  47. }
  48. .layout-builder__add-block {
  49. padding: 1.5em 0;
  50. text-align: center;
  51. background-color: #eff6fc;
  52. }
  53. .layout-builder__link--remove {
  54. position: relative;
  55. z-index: 2;
  56. display: inline-block;
  57. box-sizing: border-box;
  58. width: 26px;
  59. height: 26px;
  60. margin-inline: -10px 6px;
  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. &:hover {
  69. background-image: url(../../../misc/icons/787878/ex.svg);
  70. }
  71. }
  72. .layout-builder-block {
  73. padding: 1.5em;
  74. cursor: move;
  75. background-color: #fff;
  76. & [tabindex="-1"] {
  77. pointer-events: none;
  78. }
  79. @nest .layout-builder--content-preview-disabled
  80. }
  81. /*
  82. * Layout Builder messages.
  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. /* Label when "content preview" is disabled. */
  94. .layout-builder-block__content-preview-placeholder-label {
  95. margin: 0;
  96. text-align: center;
  97. font-size: 1.429em;
  98. line-height: 1.4;
  99. }
  100. .layout-builder__add-section.is-layout-builder-highlighted {
  101. margin-bottom: calc(1.5em - 8px);
  102. outline: none;
  103. }
  104. .layout-builder__layout.is-layout-builder-highlighted,
  105. .layout-builder-block.is-layout-builder-highlighted,
  106. .layout-builder__add-block.is-layout-builder-highlighted {
  107. position: relative;
  108. z-index: 1;
  109. margin: -4px -2px;
  110. }
  111. .layout-builder__add-block.is-layout-builder-highlighted,
  112. .layout-builder__add-section.is-layout-builder-highlighted,
  113. .layout-builder__layout.is-layout-builder-highlighted::before,
  114. .layout-builder__layout.is-layout-builder-highlighted,
  115. .layout-builder-block.is-layout-builder-highlighted {
  116. border: 4px solid #000;
  117. }
  118. .layout-builder__region-label,
  119. .layout-builder__section-label {
  120. display: none;
  121. }
  122. .layout-builder--move-blocks-active .layout-builder__region-label {
  123. display: block;
  124. }
  125. .layout-builder--move-blocks-active .layout-builder__section-label {
  126. display: inline;
  127. }
  128. .layout__region-info {
  129. padding: 0.5em;
  130. text-align: center;
  131. border-bottom: 2px dashed #979797;
  132. }
  133. /**
  134. * Remove "You have unsaved changes" warning because Layout Builder always has
  135. * unsaved changes until "Save layout" is submitted.
  136. * @todo create issue for todo.
  137. */
  138. .layout-builder-components-table .tabledrag-changed-warning {
  139. display: none !important;
  140. }

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