toolbar.module.css 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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. font-family: 'Ubuntu', sans-serif;
  12. }
  13. #toolbar-administration {
  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. /**
  25. * Very specific overrides for Drupal system CSS.
  26. */
  27. .toolbar li,
  28. .toolbar .item-list,
  29. .toolbar .item-list li,
  30. .toolbar .menu-item,
  31. .toolbar .menu-item--expanded {
  32. list-style-type: none;
  33. list-style-image: none;
  34. }
  35. .toolbar .menu-item {
  36. padding-top: 0;
  37. }
  38. .toolbar .toolbar-bar .toolbar-tab,
  39. .toolbar .menu-item {
  40. display: block;
  41. }
  42. .toolbar .toolbar-bar .toolbar-tab.hidden {
  43. display: none;
  44. }
  45. .toolbar a {
  46. display: block;
  47. line-height: 20px;
  48. }
  49. /**
  50. * Administration menu.
  51. */
  52. .toolbar .toolbar-bar,
  53. .toolbar .toolbar-tray {
  54. position: relative;
  55. z-index: 1250;
  56. }
  57. .toolbar-horizontal .toolbar-tray {
  58. position: fixed;
  59. width: 100%;
  60. left: 0;
  61. }
  62. /* Position the admin toolbar absolutely when the configured standard breakpoint
  63. * is active. The toolbar container, that contains the bar and the trays, is
  64. * position absolutely so that it scrolls with the page. Otherwise, on smaller
  65. * screens, the components of the admin toolbar are positioned statically. */
  66. .toolbar-oriented .toolbar-bar {
  67. left: 0;
  68. position: fixed;
  69. right: 0;
  70. top: 0;
  71. }
  72. /* body with toolbar tray open */
  73. body.toolbar-vertical::before {
  74. content: '';
  75. position: fixed;
  76. top: 0;
  77. left: 0;
  78. width: 100%;
  79. height: 100%;
  80. background: rgba(0, 0, 0, 0);
  81. -webkit-transition: background 0.25s;
  82. -moz-transition: background 0.25s;
  83. -o-transition: background 0.25s;
  84. transition: background 0.25s;
  85. z-index: 12;
  86. pointer-events: none;
  87. }
  88. body.toolbar-fixed.toolbar-tray-open::before {
  89. display: none;
  90. }
  91. body.toolbar-vertical.toolbar-tray-open::before {
  92. position: fixed;
  93. background: rgba(0, 0, 0, 0.2);
  94. -webkit-transition: background 0.25s;
  95. -moz-transition: background 0.25s;
  96. -o-transition: background 0.25s;
  97. transition: background 0.25s;
  98. pointer-events: auto;
  99. }
  100. body.toolbar-tray-open.toolbar-fixed.toolbar-vertical {
  101. overflow-x: hidden;
  102. overflow-y: auto;
  103. }
  104. body.toolbar-tray-open.toolbar-vertical {
  105. overflow: hidden;
  106. }
  107. /* .toolbar-loading is required by Toolbar JavaScript to pre-render markup
  108. * style to avoid extra reflow & flicker. */
  109. @media (min-width: 61em) {
  110. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-bar .toolbar-tab:last-child .toolbar-tray {
  111. position: relative;
  112. display: block;
  113. z-index: -999;
  114. visibility: hidden;
  115. width: 1px;
  116. }
  117. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-bar .toolbar-tab:last-child .toolbar-tray .toolbar-lining {
  118. width: 999em;
  119. }
  120. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-bar .home-toolbar-tab + .toolbar-tab .toolbar-tray {
  121. display: block;
  122. }
  123. }
  124. /* Layer the bar just above the trays and above contextual link triggers. */
  125. .toolbar-oriented .toolbar-bar {
  126. z-index: 502;
  127. }
  128. /* Position the admin toolbar fixed when the configured standard breakpoint is
  129. * active. */
  130. body.toolbar-fixed .toolbar-oriented .toolbar-bar {
  131. position: fixed;
  132. }
  133. /* Present the admin toolbar tabs horizontally as a default on user agents that
  134. * do not understand media queries or on user agents where JavaScript is
  135. * disabled. */
  136. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-tray .toolbar-menu > li,
  137. .toolbar .toolbar-bar .toolbar-tab,
  138. .toolbar .toolbar-tray-horizontal li {
  139. float: left; /* LTR */
  140. }
  141. [dir="rtl"] .toolbar-loading.toolbar-horizontal .toolbar .toolbar-tray .toolbar-menu > li,
  142. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  143. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  144. float: right;
  145. }
  146. /* Present the admin toolbar tabs vertically by default on user agents that
  147. * that understand media queries. This will be the small screen default. */
  148. @media only screen {
  149. .toolbar .toolbar-bar .toolbar-tab,
  150. .toolbar .toolbar-tray-horizontal li {
  151. float: none; /* LTR */
  152. }
  153. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  154. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  155. float: none;
  156. }
  157. }
  158. /* This min-width media query is meant to provide basic horizontal layout to
  159. * the main menu tabs when JavaScript is disabled on user agents that understand
  160. * media queries. */
  161. @media (min-width: 16.5em) {
  162. .toolbar .toolbar-bar .toolbar-tab,
  163. .toolbar .toolbar-tray-horizontal li {
  164. float: left; /* LTR */
  165. }
  166. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  167. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  168. float: right;
  169. }
  170. }
  171. /* Present the admin toolbar tabs horizontally when the configured narrow
  172. * breakpoint is active. */
  173. .toolbar-oriented .toolbar-bar .toolbar-tab,
  174. .toolbar-oriented .toolbar-tray-horizontal li {
  175. float: left; /* LTR */
  176. }
  177. [dir="rtl"] .toolbar-oriented .toolbar-bar .toolbar-tab,
  178. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal li {
  179. float: right;
  180. }
  181. /**
  182. * Toolbar tray.
  183. */
  184. .toolbar .toolbar-tray {
  185. z-index: 501;
  186. }
  187. .toolbar-oriented .toolbar-tray-vertical {
  188. left: -100%; /* LTR */
  189. position: absolute;
  190. width: 320px;
  191. }
  192. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical {
  193. left: auto;
  194. right: -100%;
  195. }
  196. .toolbar .toolbar-tray-vertical > .toolbar-lining {
  197. margin-bottom: 60px;
  198. }
  199. /* Layer the links just above the toolbar-tray. */
  200. .toolbar .toolbar-bar .toolbar-tab > .toolbar-icon {
  201. position: relative;
  202. z-index: 502;
  203. }
  204. /* Hide secondary menus when the tray is horizontal. */
  205. .toolbar-oriented .toolbar-tray-horizontal .menu-item ul {
  206. display: none;
  207. }
  208. /* When the configured standard breakpoint is active and the tray is in a
  209. * vertical position, the tray does not scroll with the page. The contents of
  210. * the tray scroll within the confines of the viewport.
  211. */
  212. .toolbar-vertical .toolbar.toolbar-oriented .toolbar-tray,
  213. .toolbar .toolbar-tray-vertical.is-active,
  214. body.toolbar-fixed .toolbar .toolbar-tray-vertical {
  215. height: 100%;
  216. min-height: 100%;
  217. overflow-x: hidden;
  218. overflow-y: auto;
  219. position: fixed;
  220. min-width: 240px;
  221. width: 80%;
  222. max-width: 320px;
  223. }
  224. .toolbar-fixed .toolbar .toolbar-tray {
  225. display: none;
  226. }
  227. .toolbar .toolbar-tray.is-active {
  228. display: block;
  229. }
  230. .toolbar-fixed.toolbar-vertical .toolbar.toolbar-oriented .toolbar-tray {
  231. transition: none;
  232. }
  233. .toolbar-vertical .toolbar.toolbar-oriented .toolbar-tray {
  234. transition: all 0.5s ease;
  235. }
  236. /* Bring the tray into the viewport. By default it is just off-screen. */
  237. .toolbar-oriented .toolbar-tray-vertical.is-active {
  238. left: 0; /* LTR */
  239. }
  240. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical.is-active {
  241. left: auto;
  242. right: 0;
  243. }
  244. /* When the configured standard breakpoint is active, the tray appears to push
  245. * the page content away from the edge of the viewport. */
  246. body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  247. margin-left: 320px; /* LTR */
  248. }
  249. @media print {
  250. body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  251. margin-left: 0;
  252. }
  253. }
  254. [dir="rtl"] body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  255. margin-left: auto;
  256. margin-right: 320px;
  257. }
  258. @media print {
  259. [dir="rtl"] body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  260. margin-right: 0;
  261. }
  262. }
  263. /**
  264. * ToolBar tray orientation toggle.
  265. */
  266. /* Hide the orientation toggle when the configured narrow breakpoint is not
  267. * active. */
  268. .toolbar .toolbar-tray .toolbar-toggle-orientation {
  269. display: none;
  270. }
  271. /* Show the orientation toggle when the configured narrow breakpoint is
  272. * active. */
  273. .toolbar-oriented .toolbar-tray .toolbar-toggle-orientation {
  274. display: block;
  275. }
  276. .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  277. bottom: 0;
  278. position: absolute;
  279. right: 0; /* LTR */
  280. top: auto;
  281. }
  282. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  283. left: 0;
  284. right: auto;
  285. }
  286. .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  287. float: right; /* LTR */
  288. }
  289. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  290. float: left;
  291. }
  292. /**
  293. * Toolbar home button toggle.
  294. */
  295. .toolbar .toolbar-bar .home-toolbar-tab {
  296. float: right;
  297. }
  298. .path-admin .toolbar-bar .home-toolbar-tab {
  299. display: block;
  300. }