sidebar.css

Same filename in this branch
  1. main core/themes/admin/migration/css/components/sidebar.css
  2. main core/themes/default_admin/migration/css/components/sidebar.css
Same filename and directory in other branches
  1. 9 core/themes/bartik/css/components/sidebar.css
  2. 8.9.x core/themes/bartik/css/components/sidebar.css
  3. 11.x core/themes/admin/migration/css/components/sidebar.css
  4. 11.x core/themes/default_admin/migration/css/components/sidebar.css
  5. 11.x core/themes/default_admin/css/components/sidebar.css

Sidebar panel and controls.

File

core/themes/default_admin/css/components/sidebar.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Sidebar panel and controls.
  10. */
  11. #sidebar-draggable {
  12. position: absolute;
  13. z-index: 104;
  14. display: block;
  15. width: 2px;
  16. height: 100%;
  17. padding: 0;
  18. cursor: ew-resize;
  19. inset-block-start: 0;
  20. inset-inline-start: 0;
  21. &:hover {
  22. background-color: var(--admin-color-border-table);
  23. }
  24. &:active {
  25. background-color: var(--admin-color-border);
  26. }
  27. @media (prefers-reduced-motion: no-preference) {
  28. transition: var(--admin-transition-slow);
  29. }
  30. }
  31. .layout-region--secondary {
  32. @media (prefers-reduced-motion: no-preference) {
  33. transition: transform var(--admin-transition-slow);
  34. }
  35. @media (max-width: 60.99em) {
  36. --admin-theme-sidebar-width: var(--admin-theme-sidebar-small-width);
  37. }
  38. @media (max-width: 63.99em) {
  39. visibility: hidden;
  40. opacity: 0;
  41. }
  42. }
  43. body[data-meta-sidebar="closed"] {
  44. --admin-theme-sidebar-offset: 0px;
  45. .layout-region--secondary {
  46. visibility: hidden;
  47. transform: translateX(var(--admin-theme-sidebar-width));
  48. &:dir(rtl) {
  49. transform: translateX(calc(var(--admin-theme-sidebar-width) * -1));
  50. }
  51. }
  52. }
  53. body[data-meta-sidebar="open"] {
  54. .layout-region--secondary {
  55. @media (max-width: 63.99em) {
  56. visibility: visible;
  57. opacity: 1;
  58. }
  59. }
  60. }
  61. :is(#extra-specificity-hack, [data-drupal-admin-styles]) .meta-sidebar__close,
  62. .meta-sidebar__close {
  63. width: 2rem;
  64. height: 2rem;
  65. cursor: pointer;
  66. border-radius: var(--admin-radius-m);
  67. background: transparent;
  68. &::before {
  69. display: inline-block;
  70. width: 100%;
  71. height: 100%;
  72. content: "";
  73. background-color: var(--admin-color-icon);
  74. mask-repeat: no-repeat;
  75. mask-position: center center;
  76. }
  77. &:hover,
  78. &:focus {
  79. background-color: var(--admin-color-primary-soft);
  80. &::before {
  81. background-color: var(--admin-color-primary);
  82. }
  83. }
  84. &.is-active {
  85. background-color: var(--admin-color-primary-soft-hover);
  86. &::before {
  87. background-color: var(--admin-color-primary-active);
  88. }
  89. }
  90. @media (prefers-reduced-motion: no-preference) {
  91. transition: background var(--admin-transition-slow);
  92. }
  93. }
  94. :is(#extra-specificity-hack, [data-drupal-admin-styles]) .meta-sidebar__trigger,
  95. .meta-sidebar__trigger {
  96. display: block;
  97. width: 2rem;
  98. height: 2rem;
  99. cursor: pointer;
  100. border-radius: var(--admin-radius-m);
  101. background: transparent;
  102. &::before {
  103. display: inline-block;
  104. width: 100%;
  105. height: 100%;
  106. content: "";
  107. border-radius: 50%;
  108. background-color: var(--admin-color-icon);
  109. mask-repeat: no-repeat;
  110. mask-position: center center;
  111. mask-image: url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3e %3cg fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e %3crect x='2' y='2' width='20' height='18' rx='4' ry='4'%3e%3c/rect%3e %3cline x1='14' y1='2' x2='14' y2='20'%3e%3c/line%3e %3cline x1='17.25' y1='7' x2='18.5' y2='7'%3e%3c/line%3e %3cline x1='17.25' y1='11.5' x2='18.5' y2='11.5'%3e%3c/line%3e %3c/g%3e%3c/svg%3e");
  112. mask-size: var(--admin-icon-size-sidebar-toggle) var(--admin-icon-size-sidebar-toggle);
  113. }
  114. &:hover,
  115. &:focus,
  116. &.is-active,
  117. &.is-active:hover {
  118. background-color: var(--admin-color-primary-soft);
  119. &::before {
  120. background-color: var(--admin-color-primary);
  121. }
  122. @media (forced-colors: active) {
  123. &::before {
  124. background: buttonText;
  125. }
  126. }
  127. }
  128. &.is-active {
  129. background-color: var(--admin-color-bg-item-hover);
  130. }
  131. @media (forced-colors: active) {
  132. &::before {
  133. background: buttonText;
  134. }
  135. }
  136. @media (prefers-reduced-motion: no-preference) {
  137. transition: background var(--admin-transition-slow);
  138. }
  139. }
  140. :is(#extra-specificity-hack, [data-drupal-admin-styles]) .meta-sidebar__close,
  141. .meta-sidebar__close {
  142. position: absolute;
  143. z-index: 104;
  144. inset-block-start: 1.125rem;
  145. inset-inline-end: var(--admin-space-m);
  146. &::before {
  147. mask-image: url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3e %3cg fill='none' stroke='currentColor' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3e %3cpath d='M20 4L4 20' /%3e %3cpath d='M4 4L20 20' /%3e %3c/g%3e%3c/svg%3e");
  148. mask-size: 1rem 1rem;
  149. }
  150. @media (min-width: 64em) {
  151. display: none;
  152. }
  153. }
  154. :is(#extra-specificity-hack, [data-drupal-admin-styles]) .meta-sidebar__overlay,
  155. .meta-sidebar__overlay {
  156. position: fixed;
  157. z-index: 102;
  158. visibility: hidden;
  159. width: 100%;
  160. height: 100%;
  161. opacity: 0;
  162. background: var(--admin-color-bg-surface-nested);
  163. inset-block-start: 0;
  164. inset-inline-start: 0;
  165. @media (min-width: 64em) {
  166. display: none;
  167. }
  168. }
  169. body[data-meta-sidebar="open"] :is(#extra-specificity-hack, [data-drupal-admin-styles]) .meta-sidebar__overlay,
  170. body[data-meta-sidebar="open"] .meta-sidebar__overlay {
  171. visibility: visible;
  172. opacity: 0.9;
  173. }

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