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/claro/css/components/toolbar.module.css
  2. 11.1.x core/modules/toolbar/css/toolbar.module.css

toolbar.module.css

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

File

core/themes/stable9/css/toolbar/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. /* .toolbar-loading is required by Toolbar JavaScript to pre-render markup
  81. * style to avoid extra reflow & flicker. */
  82. @media (min-width: 61em) {
  83. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-bar .toolbar-tab:last-child .toolbar-tray {
  84. display: none;
  85. }
  86. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-bar .toolbar-tab:last-child .toolbar-tray .toolbar-lining {
  87. width: 999em;
  88. }
  89. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-bar .home-toolbar-tab + .toolbar-tab .toolbar-tray {
  90. display: block;
  91. }
  92. }
  93. /* Layer the bar just above the trays and above contextual link triggers. */
  94. .toolbar-oriented .toolbar-bar {
  95. z-index: 502;
  96. }
  97. /* Position the admin toolbar fixed when the configured standard breakpoint is
  98. * active. */
  99. body.toolbar-fixed .toolbar-oriented .toolbar-bar,
  100. html.toolbar-fixed .toolbar-oriented .toolbar-bar {
  101. position: fixed;
  102. }
  103. /* When the configured narrow breakpoint is active, the toolbar is sized to wrap
  104. * around the trays in order to provide a context for scrolling tray content
  105. * that is taller than the viewport. */
  106. body.toolbar-tray-open.toolbar-fixed.toolbar-vertical .toolbar-oriented,
  107. html.toolbar-tray-open.toolbar-fixed.toolbar-vertical .toolbar-oriented {
  108. bottom: 0;
  109. width: 240px;
  110. width: 15rem;
  111. }
  112. /* Present the admin toolbar tabs horizontally as a default on user agents that
  113. * do not understand media queries or on user agents where JavaScript is
  114. * disabled. */
  115. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-tray .toolbar-menu > li,
  116. .toolbar .toolbar-bar .toolbar-tab,
  117. .toolbar .toolbar-tray-horizontal li {
  118. float: left; /* LTR */
  119. }
  120. [dir="rtl"] .toolbar-loading.toolbar-horizontal .toolbar .toolbar-tray .toolbar-menu > li,
  121. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  122. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  123. float: right;
  124. }
  125. /* Present the admin toolbar tabs vertically by default on user agents that
  126. * that understand media queries. This will be the small screen default. */
  127. @media only screen {
  128. .toolbar .toolbar-bar .toolbar-tab,
  129. .toolbar .toolbar-tray-horizontal li {
  130. float: none; /* LTR */
  131. }
  132. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  133. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  134. float: none;
  135. }
  136. }
  137. /* This min-width media query is meant to provide basic horizontal layout to
  138. * the main menu tabs when JavaScript is disabled on user agents that understand
  139. * media queries. */
  140. @media (min-width: 16.5em) {
  141. .toolbar .toolbar-bar .toolbar-tab,
  142. .toolbar .toolbar-tray-horizontal li {
  143. float: left; /* LTR */
  144. }
  145. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  146. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  147. float: right;
  148. }
  149. }
  150. /* Present the admin toolbar tabs horizontally when the configured narrow
  151. * breakpoint is active. */
  152. .toolbar-oriented .toolbar-bar .toolbar-tab,
  153. .toolbar-oriented .toolbar-tray-horizontal li {
  154. float: left; /* LTR */
  155. }
  156. [dir="rtl"] .toolbar-oriented .toolbar-bar .toolbar-tab,
  157. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal li {
  158. float: right;
  159. }
  160. /**
  161. * Toolbar tray.
  162. */
  163. .toolbar .toolbar-tray {
  164. z-index: 501;
  165. display: none;
  166. }
  167. .toolbar-oriented .toolbar-tray-vertical {
  168. position: absolute;
  169. left: -100%; /* LTR */
  170. width: 240px;
  171. width: 15rem;
  172. }
  173. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical {
  174. right: -100%;
  175. left: auto;
  176. }
  177. .toolbar .toolbar-tray-vertical > .toolbar-lining {
  178. min-height: 100%;
  179. }
  180. /* Layer the links just above the toolbar-tray. */
  181. .toolbar .toolbar-bar .toolbar-tab > .toolbar-icon {
  182. position: relative;
  183. z-index: 502;
  184. }
  185. /* Hide secondary menus when the tray is horizontal. */
  186. .toolbar-oriented .toolbar-tray-horizontal .menu-item ul {
  187. display: none;
  188. }
  189. /* When the configured standard breakpoint is active and the tray is in a
  190. * vertical position, the tray does not scroll with the page. The contents of
  191. * the tray scroll within the confines of the viewport.
  192. */
  193. .toolbar .toolbar-tray-vertical.is-active,
  194. body.toolbar-fixed .toolbar .toolbar-tray-vertical,
  195. html.toolbar-fixed .toolbar .toolbar-tray-vertical {
  196. position: fixed;
  197. overflow-x: hidden;
  198. overflow-y: auto;
  199. height: 100%;
  200. }
  201. .toolbar .toolbar-tray.is-active {
  202. display: block;
  203. }
  204. /* Bring the tray into the viewport. By default it is just off-screen. */
  205. .toolbar-oriented .toolbar-tray-vertical.is-active {
  206. left: 0; /* LTR */
  207. }
  208. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical.is-active {
  209. right: 0;
  210. left: auto;
  211. }
  212. /* When the configured standard breakpoint is active, the tray appears to push
  213. * the page content away from the edge of the viewport. */
  214. body.toolbar-tray-open.toolbar-vertical.toolbar-fixed,
  215. html.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  216. margin-left: 240px; /* LTR */
  217. margin-left: 15rem; /* LTR */
  218. }
  219. @media print {
  220. body.toolbar-tray-open.toolbar-vertical.toolbar-fixed,
  221. html.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  222. margin-left: 0;
  223. }
  224. }
  225. [dir="rtl"] body.toolbar-tray-open.toolbar-vertical.toolbar-fixed,
  226. [dir="rtl"].toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  227. margin-right: 240px;
  228. margin-right: 15rem;
  229. margin-left: auto;
  230. }
  231. @media print {
  232. [dir="rtl"] body.toolbar-tray-open.toolbar-vertical.toolbar-fixed,
  233. [dir="rtl"].toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  234. margin-right: 0;
  235. }
  236. }
  237. /**
  238. * ToolBar tray orientation toggle.
  239. */
  240. /* Hide the orientation toggle when the configured narrow breakpoint is not
  241. * active. */
  242. .toolbar .toolbar-tray .toolbar-toggle-orientation {
  243. display: none;
  244. }
  245. /* Show the orientation toggle when the configured narrow breakpoint is
  246. * active. */
  247. .toolbar-oriented .toolbar-tray .toolbar-toggle-orientation {
  248. display: block;
  249. }
  250. .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  251. position: absolute;
  252. top: auto;
  253. right: 0; /* LTR */
  254. bottom: 0;
  255. }
  256. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  257. right: auto;
  258. left: 0;
  259. }
  260. .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  261. float: right; /* LTR */
  262. width: 100%;
  263. }
  264. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  265. float: left;
  266. }
  267. /**
  268. * Toolbar home button toggle.
  269. */
  270. .toolbar .toolbar-bar .home-toolbar-tab {
  271. display: none;
  272. }
  273. .path-admin .toolbar-bar .home-toolbar-tab {
  274. display: block;
  275. }

API Navigation

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