toolbar.module.css 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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. font-size: small;
  14. line-height: 1;
  15. margin: 0;
  16. padding: 0;
  17. vertical-align: baseline;
  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. width: 100%;
  63. left: 0;
  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. left: 0;
  71. position: absolute;
  72. right: 0;
  73. top: 0;
  74. }
  75. .toolbar-oriented .toolbar-tray {
  76. left: 0;
  77. position: absolute;
  78. right: 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. display: block;
  86. z-index: -999;
  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. display: none;
  167. z-index: 501;
  168. }
  169. .toolbar-oriented .toolbar-tray-vertical {
  170. left: -100%; /* LTR */
  171. position: absolute;
  172. width: 240px;
  173. width: 15rem;
  174. }
  175. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical {
  176. left: auto;
  177. right: -100%;
  178. }
  179. .toolbar .toolbar-tray-vertical > .toolbar-lining {
  180. min-height: 100%;
  181. }
  182. .toolbar .toolbar-tray-vertical > .toolbar-lining:before {
  183. width: 100%;
  184. }
  185. .toolbar-oriented .toolbar-tray-vertical > .toolbar-lining:before {
  186. bottom: 0;
  187. content: '';
  188. display: block;
  189. left: 0; /* LTR */
  190. position: fixed;
  191. top: 0;
  192. width: 240px;
  193. width: 14rem;
  194. z-index: -1;
  195. }
  196. [dir="rtl"] .toolbar .toolbar-tray-vertical > .toolbar-lining:before {
  197. left: auto;
  198. right: 0;
  199. }
  200. /* Layer the links just above the toolbar-tray. */
  201. .toolbar .toolbar-bar .toolbar-tab > .toolbar-icon {
  202. position: relative;
  203. z-index: 502;
  204. }
  205. /* Hide secondary menus when the tray is horizontal. */
  206. .toolbar-oriented .toolbar-tray-horizontal .menu-item ul {
  207. display: none;
  208. }
  209. /* When the configured standard breakpoint is active and the tray is in a
  210. * vertical position, the tray does not scroll with the page. The contents of
  211. * the tray scroll within the confines of the viewport.
  212. */
  213. .toolbar .toolbar-tray-vertical.is-active,
  214. body.toolbar-fixed .toolbar .toolbar-tray-vertical {
  215. height: 100%;
  216. overflow-x: hidden;
  217. overflow-y: auto;
  218. position: fixed;
  219. }
  220. .toolbar .toolbar-tray.is-active {
  221. display: block;
  222. }
  223. /* Bring the tray into the viewport. By default it is just off-screen. */
  224. .toolbar-oriented .toolbar-tray-vertical.is-active {
  225. left: 0; /* LTR */
  226. }
  227. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical.is-active {
  228. left: auto;
  229. right: 0;
  230. }
  231. /* When the configured standard breakpoint is active, the tray appears to push
  232. * the page content away from the edge of the viewport. */
  233. body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  234. margin-left: 240px; /* LTR */
  235. margin-left: 15rem; /* LTR */
  236. }
  237. @media print {
  238. body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  239. margin-left: 0;
  240. }
  241. }
  242. [dir="rtl"] body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  243. margin-left: auto;
  244. margin-left: auto;
  245. margin-right: 240px;
  246. margin-right: 15rem;
  247. }
  248. @media print {
  249. [dir="rtl"] body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  250. margin-right: 0;
  251. }
  252. }
  253. /**
  254. * ToolBar tray orientation toggle.
  255. */
  256. /* Hide the orientation toggle when the configured narrow breakpoint is not
  257. * active. */
  258. .toolbar .toolbar-tray .toolbar-toggle-orientation {
  259. display: none;
  260. }
  261. /* Show the orientation toggle when the configured narrow breakpoint is
  262. * active. */
  263. .toolbar-oriented .toolbar-tray .toolbar-toggle-orientation {
  264. display: block;
  265. }
  266. .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  267. bottom: 0;
  268. position: absolute;
  269. right: 0; /* LTR */
  270. top: auto;
  271. }
  272. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  273. left: 0;
  274. right: auto;
  275. }
  276. .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  277. float: right; /* LTR */
  278. width: 100%;
  279. }
  280. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  281. float: left;
  282. }
  283. /**
  284. * Toolbar home button toggle.
  285. */
  286. .toolbar .toolbar-bar .home-toolbar-tab {
  287. display: none;
  288. }
  289. .path-admin .toolbar-bar .home-toolbar-tab {
  290. display: block;
  291. }