toolbar.module.css 7.4 KB

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