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

Breadcrumb

  1. Drupal Core 11.1.x

workspaces.off-canvas.pcss.css

Styling for the Workspaces off-canvas user interface.

File

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

View source
  1. /**
  2. * @file
  3. * Styling for the Workspaces off-canvas user interface.
  4. */
  5. @custom-media --workspace-layout-small (max-width: 767px);
  6. @custom-media --workspace-layout-large (min-width: 767px);
  7. #drupal-off-canvas-wrapper.workspaces-dialog {
  8. padding-bottom: calc(var(--off-canvas-padding) / 2);
  9. & .ui-dialog-content > div {
  10. @media (--workspace-layout-large) {
  11. display: flex;
  12. align-items: flex-end;
  13. width: 100%;
  14. height: 100%;
  15. }
  16. }
  17. & + .ui-dialog .ui-dialog-content {
  18. @media (--workspace-layout-small) {
  19. max-height: unset !important; /* Override the max-height added by JS. */
  20. }
  21. }
  22. /**
  23. * The Workspace UI hides the titlebar, but we need to show and correctly
  24. * position the close button that is nested within it.
  25. */
  26. & .ui-dialog-titlebar {
  27. all: revert;
  28. &::before {
  29. content: none;
  30. }
  31. & .ui-dialog-title {
  32. display: none;
  33. }
  34. & .ui-dialog-titlebar-close {
  35. inset-block-start: 1em;
  36. inset-inline-end: 1em;
  37. z-index: 1;
  38. transform: none;
  39. }
  40. }
  41. & .active-workspace {
  42. padding: 0 var(--off-canvas-padding);
  43. @media (--workspace-layout-large) {
  44. display: flex;
  45. flex-direction: column;
  46. flex-basis: 200px;
  47. flex-grow: 2;
  48. align-self: stretch;
  49. order: 1;
  50. padding: var(--off-canvas-padding) var(--off-canvas-padding) 0;
  51. }
  52. }
  53. & .active-workspace__title {
  54. font-size: 13px;
  55. font-weight: bold;
  56. }
  57. & .active-workspace__label {
  58. position: relative; /* Anchor icon pseudo-element. */
  59. padding: 18px 50px 0;
  60. color: #fff;
  61. font-size: 18px;
  62. font-weight: bold;
  63. line-height: 1.2;
  64. &::before {
  65. position: absolute;
  66. inset-inline-start: 0;
  67. display: block;
  68. width: 20px;
  69. height: 20px;
  70. content: "";
  71. background: url("../icons/f0a100/ws_icon.svg") center center no-repeat;
  72. background-size: contain;
  73. @media (--workspace-layout-large) {
  74. width: 40px;
  75. height: 40px;
  76. }
  77. }
  78. }
  79. /* This is the "Manage workspace" link that appears when you're on a non-default workspace. */
  80. & .active-workspace__manage {
  81. display: block;
  82. font-size: 13px;
  83. }
  84. /* This is the link to "View all workspaces". */
  85. & .all-workspaces {
  86. display: inline-block;
  87. padding: var(--off-canvas-padding);
  88. font-size: 14px;
  89. @media (--workspace-layout-large) {
  90. grid-row: 1;
  91. grid-column: 2;
  92. justify-self: end;
  93. padding: 0;
  94. }
  95. }
  96. & .workspaces {
  97. & > h3 {
  98. margin-top: 0;
  99. }
  100. & ul {
  101. display: flex;
  102. flex-direction: column;
  103. grid-row: 2;
  104. grid-column: 1 / -1;
  105. margin: 0;
  106. padding: 0;
  107. list-style: none;
  108. gap: 2px;
  109. @media (--workspace-layout-large) {
  110. flex-direction: row;
  111. }
  112. }
  113. & li {
  114. flex: 1;
  115. }
  116. @media (--workspace-layout-large) {
  117. display: grid;
  118. flex-grow: 8;
  119. grid-template-columns: 1fr 1fr;
  120. }
  121. }
  122. /* This is the link to the workspace. */
  123. & .workspaces__item {
  124. position: relative;
  125. display: block;
  126. min-height: 75px;
  127. padding-block-start: var(--off-canvas-padding);
  128. padding-inline-start: 50px;
  129. color: var(--off-canvas-text-color);
  130. outline-offset: -2px; /* Ensure focus outline doesn't overflow. */
  131. background-color: var(--off-canvas-background-color-light);
  132. font-size: 14px;
  133. font-weight: bold;
  134. &:hover,
  135. &:focus {
  136. background-color: #666;
  137. }
  138. &::before {
  139. position: absolute;
  140. inset-inline-start: var(--off-canvas-padding);
  141. display: block;
  142. width: 20px;
  143. height: 20px;
  144. content: "";
  145. background: url("../icons/f0a100/ws_icon.svg") center center no-repeat;
  146. background-size: 100% auto;
  147. }
  148. }
  149. & .active-workspace--default .active-workspace__label::before,
  150. & .workspaces__item--default::before {
  151. background-image: url("../icons/81c071/ws_icon.svg"); /* Green icon. */
  152. }
  153. & .active-workspace__actions .button {
  154. margin: 10px 0 0;
  155. }
  156. @media (--workspace-layout-small) {
  157. height: 100% !important;
  158. }
  159. }
RSS feed
Powered by Drupal