Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

off-canvas.pcss.css

Layout Builder styling for off-canvas UI.

File

core/modules/layout_builder/css/off-canvas.pcss.css

View source
  1. /**
  2. * @file
  3. * Layout Builder styling for off-canvas UI.
  4. */
  5. #drupal-off-canvas-wrapper {
  6. & .layout-selection {
  7. margin: 0;
  8. padding: 0;
  9. list-style: none;
  10. & li {
  11. position: relative; /* Anchor throbber. */
  12. padding: calc(0.25 * var(--off-canvas-vertical-spacing-unit));
  13. border-bottom: 1px solid var(--off-canvas-border-color);
  14. &:last-child {
  15. padding-bottom: 0;
  16. border-bottom: none;
  17. }
  18. }
  19. /* Horizontally align icon and text. */
  20. & a {
  21. display: flex;
  22. flex-wrap: wrap;
  23. align-items: center;
  24. gap: 10px;
  25. padding: 10px;
  26. }
  27. }
  28. /*
  29. * This is the styling of the SVG within the layout selection list.
  30. */
  31. & .layout-icon__region {
  32. fill: var(--off-canvas-text-color);
  33. stroke: transparent;
  34. @media (forced-colors: active) {
  35. fill: canvastext;
  36. }
  37. }
  38. & .inline-block-create-button {
  39. --icon-size: 16px;
  40. position: relative; /* Anchor pseudo-element. */
  41. display: block;
  42. padding: 24px;
  43. padding-inline-start: calc(2 * var(--off-canvas-padding) + var(--icon-size) / 2); /* Room for icon */
  44. border-bottom: 1px solid #333;
  45. font-size: 16px;
  46. /* Plus icon. */
  47. &::before {
  48. position: absolute;
  49. top: 50%;
  50. left: var(--off-canvas-padding);
  51. width: var(--icon-size);
  52. height: var(--icon-size);
  53. content: "";
  54. transform: translateY(-50%);
  55. background-image: url(../../../misc/icons/bebebe/plus.svg);
  56. background-repeat: no-repeat;
  57. background-size: contain;
  58. @media (forced-colors: active) {
  59. background: linktext;
  60. mask-image: url(../../../misc/icons/bebebe/plus.svg);
  61. mask-repeat: no-repeat;
  62. mask-size: contain;
  63. }
  64. }
  65. }
  66. & .inline-block-create-button,
  67. & .inline-block-list__item {
  68. margin: 0 calc(-1 * var(--off-canvas-padding));
  69. color: var(--off-canvas-text-color);
  70. &:hover {
  71. background-color: rgba(255, 255, 255, 0.05);
  72. }
  73. &:focus {
  74. outline-offset: -4px; /* Prevent outline from being cut off. */
  75. }
  76. }
  77. & .inline-block-list {
  78. margin: 0 0 calc(2 * var(--off-canvas-vertical-spacing-unit));
  79. padding: 0;
  80. list-style: none;
  81. & li {
  82. position: relative; /* Anchor throbber. */
  83. margin: 0;
  84. padding: calc(0.25 * var(--off-canvas-vertical-spacing-unit)) 0;
  85. &:last-child {
  86. padding-bottom: 0;
  87. border-bottom: none;
  88. }
  89. }
  90. }
  91. /* This is the tag. */
  92. & .inline-block-list__item {
  93. display: block;
  94. flex-grow: 1;
  95. padding: calc(2 * var(--off-canvas-vertical-spacing-unit)) var(--off-canvas-padding);
  96. border-bottom: 1px solid var(--off-canvas-border-color);
  97. }
  98. /* Highlight the active block in the Move Block dialog. */
  99. & .layout-builder-components-table__block-label--current {
  100. padding-left: 17px;
  101. border-left: solid 5px;
  102. }
  103. }
RSS feed
Powered by Drupal