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

Breadcrumb

  1. Drupal Core 11.1.x

toolbar.module.css

Same filename in this branch
  1. 11.1.x core/themes/stable9/css/toolbar/toolbar.module.css
  2. 11.1.x core/themes/claro/css/components/toolbar.module.css

toolbar.module.css

Aggressive resets so we can achieve a consistent look in hostile CSS environments.

File

core/modules/toolbar/css/toolbar.module.css

View source
  1. /**
  2. * @file toolbar.module.css
  3. *
  4. *
  5. * Aggressive resets so we can achieve a consistent look in hostile CSS
  6. * environments.
  7. */
  8. #toolbar-administration,
  9. #toolbar-administration * {
  10. box-sizing: border-box;
  11. }
  12. #toolbar-administration {
  13. margin: 0;
  14. padding: 0;
  15. vertical-align: baseline;
  16. font-size: small;
  17. line-height: 1;
  18. }
  19. @media print {
  20. #toolbar-administration {
  21. display: none;
  22. }
  23. }
  24. .toolbar-loading #toolbar-administration {
  25. overflow: hidden;
  26. }
  27. /**
  28. * Very specific overrides for Drupal system CSS.
  29. */
  30. .toolbar li,
  31. .toolbar .item-list,
  32. .toolbar .item-list li,
  33. .toolbar .menu-item,
  34. .toolbar .menu-item--expanded {
  35. list-style-type: none;
  36. list-style-image: none;
  37. }
  38. .toolbar .menu-item {
  39. padding-top: 0;
  40. }
  41. .toolbar .toolbar-bar .toolbar-tab,
  42. .toolbar .menu-item {
  43. display: block;
  44. }
  45. .toolbar .toolbar-bar .toolbar-tab.hidden {
  46. display: none;
  47. }
  48. .toolbar a {
  49. display: block;
  50. line-height: 1;
  51. }
  52. /**
  53. * Administration menu.
  54. */
  55. .toolbar .toolbar-bar,
  56. .toolbar .toolbar-tray {
  57. position: relative;
  58. z-index: 1250;
  59. }
  60. .toolbar-horizontal .toolbar-tray {
  61. position: fixed;
  62. left: 0;
  63. width: 100%;
  64. }
  65. /* Position the admin toolbar absolutely when the configured standard breakpoint
  66. * is active. The toolbar container, that contains the bar and the trays, is
  67. * position absolutely so that it scrolls with the page. Otherwise, on smaller
  68. * screens, the components of the admin toolbar are positioned statically. */
  69. .toolbar-oriented .toolbar-bar {
  70. position: absolute;
  71. top: 0;
  72. right: 0;
  73. left: 0;
  74. }
  75. .toolbar-oriented .toolbar-tray {
  76. position: absolute;
  77. right: 0;
  78. left: 0;
  79. }
  80. /* Layer the bar just above the trays and above contextual link triggers. */
  81. .toolbar-oriented .toolbar-bar {
  82. z-index: 502;
  83. }
  84. /* Position the admin toolbar fixed when the configured standard breakpoint is
  85. * active. */
  86. .toolbar-fixed .toolbar-oriented .toolbar-bar {
  87. position: fixed;
  88. }
  89. /* When the configured narrow breakpoint is active, the toolbar is sized to wrap
  90. * around the trays in order to provide a context for scrolling tray content
  91. * that is taller than the viewport. */
  92. .toolbar-tray-open.toolbar-fixed.toolbar-vertical .toolbar-oriented {
  93. bottom: 0;
  94. width: 240px;
  95. width: 15rem;
  96. }
  97. /* Present the admin toolbar tabs horizontally as a default on user agents that
  98. * do not understand media queries or on user agents where JavaScript is
  99. * disabled. */
  100. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-tray .toolbar-menu > li,
  101. .toolbar .toolbar-bar .toolbar-tab,
  102. .toolbar .toolbar-tray-horizontal li {
  103. float: left; /* LTR */
  104. }
  105. [dir="rtl"] .toolbar-loading.toolbar-horizontal .toolbar .toolbar-tray .toolbar-menu > li,
  106. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  107. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  108. float: right;
  109. }
  110. /* Present the admin toolbar tabs vertically by default on user agents that
  111. * that understand media queries. This will be the small screen default. */
  112. @media only screen {
  113. .toolbar .toolbar-bar .toolbar-tab,
  114. .toolbar .toolbar-tray-horizontal li {
  115. float: none; /* LTR */
  116. }
  117. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  118. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  119. float: none;
  120. }
  121. }
  122. /* This min-width media query is meant to provide basic horizontal layout to
  123. * the main menu tabs when JavaScript is disabled on user agents that understand
  124. * media queries. */
  125. @media (min-width: 16.5em) {
  126. .toolbar .toolbar-bar .toolbar-tab,
  127. .toolbar .toolbar-tray-horizontal li {
  128. float: left; /* LTR */
  129. }
  130. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  131. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  132. float: right;
  133. }
  134. }
  135. /* Present the admin toolbar tabs horizontally when the configured narrow
  136. * breakpoint is active. */
  137. .toolbar-oriented .toolbar-bar .toolbar-tab,
  138. .toolbar-oriented .toolbar-tray-horizontal li {
  139. float: left; /* LTR */
  140. }
  141. [dir="rtl"] .toolbar-oriented .toolbar-bar .toolbar-tab,
  142. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal li {
  143. float: right;
  144. }
  145. /**
  146. * Toolbar tray.
  147. */
  148. .toolbar .toolbar-tray {
  149. z-index: 501;
  150. display: none;
  151. }
  152. .toolbar-oriented .toolbar-tray-vertical {
  153. position: absolute;
  154. left: -100%; /* LTR */
  155. width: 240px;
  156. width: 15rem;
  157. }
  158. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical {
  159. right: -100%;
  160. left: auto;
  161. }
  162. .toolbar .toolbar-tray-vertical > .toolbar-lining {
  163. min-height: 100%;
  164. }
  165. /* Layer the links just above the toolbar-tray. */
  166. .toolbar .toolbar-bar .toolbar-tab > .toolbar-icon {
  167. position: relative;
  168. z-index: 502;
  169. }
  170. /* Hide secondary menus when the tray is horizontal. */
  171. .toolbar-oriented .toolbar-tray-horizontal .menu-item ul {
  172. display: none;
  173. }
  174. /* When the configured standard breakpoint is active and the tray is in a
  175. * vertical position, the tray does not scroll with the page. The contents of
  176. * the tray scroll within the confines of the viewport.
  177. */
  178. .toolbar .toolbar-tray-vertical.is-active,
  179. .toolbar-fixed .toolbar .toolbar-tray-vertical {
  180. position: fixed;
  181. overflow-x: hidden;
  182. overflow-y: auto;
  183. height: 100%;
  184. }
  185. .toolbar .toolbar-tray.is-active {
  186. display: block;
  187. }
  188. /* Bring the tray into the viewport. By default it is just off-screen. */
  189. .toolbar-oriented .toolbar-tray-vertical.is-active {
  190. left: 0; /* LTR */
  191. }
  192. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical.is-active {
  193. right: 0;
  194. left: auto;
  195. }
  196. /* When the configured standard breakpoint is active, the tray appears to push
  197. * the page content away from the edge of the viewport. */
  198. .toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  199. margin-inline-start: 15rem;
  200. }
  201. @media print {
  202. .toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  203. margin-inline-start: 0;
  204. }
  205. }
  206. /**
  207. * ToolBar tray orientation toggle.
  208. */
  209. /* Hide the orientation toggle when the configured narrow breakpoint is not
  210. * active. */
  211. .toolbar .toolbar-tray .toolbar-toggle-orientation {
  212. display: none;
  213. }
  214. /* Show the orientation toggle when the configured narrow breakpoint is
  215. * active. */
  216. .toolbar-oriented .toolbar-tray .toolbar-toggle-orientation {
  217. display: block;
  218. }
  219. .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  220. position: absolute;
  221. top: auto;
  222. right: 0; /* LTR */
  223. bottom: 0;
  224. }
  225. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  226. right: auto;
  227. left: 0;
  228. }
  229. .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  230. float: right; /* LTR */
  231. width: 100%;
  232. }
  233. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  234. float: left;
  235. }
  236. /**
  237. * Toolbar home button toggle.
  238. */
  239. .toolbar .toolbar-bar .home-toolbar-tab {
  240. display: none;
  241. }
  242. .path-admin .toolbar-bar .home-toolbar-tab {
  243. display: block;
  244. }
  245. /* Anti flicker styling. */
  246. .toolbar-anti-flicker.toolbar-loading.toolbar-fixed body {
  247. padding-top: 2.4375rem;
  248. }
  249. .toolbar-anti-flicker.toolbar-loading.toolbar-fixed.toolbar-horizontal.toolbar-tray-open body {
  250. padding-top: 4.91331rem;
  251. }
  252. .toolbar-anti-flicker.toolbar-loading.toolbar-vertical.toolbar-tray-open .toolbar-tray {
  253. position: fixed;
  254. z-index: -1;
  255. top: 2.4375rem;
  256. bottom: 0;
  257. display: block;
  258. width: 15rem;
  259. inset-inline-start: 0;
  260. }
  261. .toolbar-tray-lazy-placeholder-link {
  262. position: relative;
  263. z-index: 0;
  264. display: block;
  265. }
  266. .toolbar-tray-open.toolbar-fixed.toolbar-vertical #toolbar-administration {
  267. margin-inline-start: -15rem;
  268. }
  269. .toolbar .toolbar-tray-vertical > .toolbar-lining::before {
  270. width: 100%;
  271. }
  272. .toolbar-oriented .toolbar-tray-vertical > .toolbar-lining::before {
  273. position: fixed;
  274. z-index: -1;
  275. top: 0;
  276. bottom: 0;
  277. display: block;
  278. width: 15rem;
  279. content: "";
  280. inset-inline-start: 0;
  281. }
  282. .toolbar-anti-flicker.toolbar-vertical.toolbar-tray-open .menu-item + .menu-item {
  283. border-top: 1px solid #ddd;
  284. }

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal