You are here

toolbar.module.css in Toolbar Anti-flicker 9.3.x

Same filename and directory in other branches
  1. 8.3 css/toolbar/toolbar.module.css
  2. 8.2 css/toolbar/toolbar.module.css

toolbar.module.css

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

File

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. 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 .toolbar-tray {
  61. position: absolute;
  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. /* Flickering fix */
  115. body.toolbar-tray-open.toolbar-fixed.toolbar-vertical #toolbar-administration {
  116. margin-left: -240px;
  117. margin-left: -15rem;
  118. }
  119. /* Present the admin toolbar tabs horizontally as a default on user agents that
  120. * do not understand media queries or on user agents where JavaScript is
  121. * disabled. */
  122. .toolbar-loading.toolbar-horizontal .toolbar .toolbar-tray .toolbar-menu > li,
  123. .toolbar .toolbar-bar .toolbar-tab,
  124. .toolbar .toolbar-tray-horizontal li {
  125. float: left; /* LTR */
  126. }
  127. [dir="rtl"] .toolbar-loading.toolbar-horizontal .toolbar .toolbar-tray .toolbar-menu > li,
  128. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  129. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  130. float: right;
  131. }
  132. /* Present the admin toolbar tabs vertically by default on user agents that
  133. * that understand media queries. This will be the small screen default. */
  134. @media only screen {
  135. .toolbar .toolbar-bar .toolbar-tab,
  136. .toolbar .toolbar-tray-horizontal li {
  137. float: none; /* LTR */
  138. }
  139. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  140. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  141. float: none;
  142. }
  143. }
  144. /* This min-width media query is meant to provide basic horizontal layout to
  145. * the main menu tabs when JavaScript is disabled on user agents that understand
  146. * media queries. */
  147. @media (min-width:16.5em) {
  148. .toolbar .toolbar-bar .toolbar-tab,
  149. .toolbar .toolbar-tray-horizontal li {
  150. float: left; /* LTR */
  151. }
  152. [dir="rtl"] .toolbar .toolbar-bar .toolbar-tab,
  153. [dir="rtl"] .toolbar .toolbar-tray-horizontal li {
  154. float: right;
  155. }
  156. }
  157. /* Present the admin toolbar tabs horizontally when the configured narrow
  158. * breakpoint is active. */
  159. .toolbar-oriented .toolbar-bar .toolbar-tab,
  160. .toolbar-oriented .toolbar-tray-horizontal li {
  161. float: left; /* LTR */
  162. }
  163. [dir="rtl"] .toolbar-oriented .toolbar-bar .toolbar-tab,
  164. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal li {
  165. float: right;
  166. }
  167. /**
  168. * Toolbar tray.
  169. */
  170. .toolbar .toolbar-tray {
  171. display: none;
  172. z-index: 501;
  173. }
  174. .toolbar-oriented .toolbar-tray-vertical {
  175. left: -100%; /* LTR */
  176. position: absolute;
  177. width: 240px;
  178. width: 15rem;
  179. }
  180. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical {
  181. left: auto;
  182. right: -100%;
  183. }
  184. .toolbar .toolbar-tray-vertical > .toolbar-lining {
  185. min-height: 100%;
  186. }
  187. .toolbar .toolbar-tray-vertical > .toolbar-lining:before {
  188. width: 100%;
  189. }
  190. .toolbar-oriented .toolbar-tray-vertical > .toolbar-lining:before {
  191. bottom: 0;
  192. content: '';
  193. display: block;
  194. left: 0; /* LTR */
  195. position: fixed;
  196. top: 0;
  197. width: 240px;
  198. width: 14rem;
  199. z-index: -1;
  200. }
  201. [dir="rtl"] .toolbar .toolbar-tray-vertical > .toolbar-lining:before {
  202. left: auto;
  203. right: 0;
  204. }
  205. /* Layer the links just above the toolbar-tray. */
  206. .toolbar .toolbar-bar .toolbar-tab > .toolbar-icon{
  207. position: relative;
  208. z-index: 502;
  209. }
  210. /* Hide secondary menus when the tray is horizontal. */
  211. .toolbar-oriented .toolbar-tray-horizontal .menu-item ul {
  212. display: none;
  213. }
  214. /* When the configured standard breakpoint is active and the tray is in a
  215. * vertical position, the tray does not scroll with the page. The contents of
  216. * the tray scroll within the confines of the viewport.
  217. */
  218. .toolbar .toolbar-tray-vertical.is-active,
  219. body.toolbar-fixed .toolbar .toolbar-tray-vertical {
  220. height: 100%;
  221. overflow-x: hidden;
  222. overflow-y: auto;
  223. position: fixed;
  224. }
  225. .toolbar .toolbar-tray.is-active {
  226. display: block;
  227. }
  228. /* Bring the tray into the viewport. By default it is just off-screen. */
  229. .toolbar-oriented .toolbar-tray-vertical.is-active {
  230. left: 0; /* LTR */
  231. }
  232. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical.is-active {
  233. left: auto;
  234. right: 0;
  235. }
  236. /* When the configured standard breakpoint is active, the tray appears to push
  237. * the page content away from the edge of the viewport. */
  238. body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  239. margin-left: 240px; /* LTR */
  240. margin-left: 15rem; /* LTR */
  241. }
  242. @media print {
  243. body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  244. margin-left: 0;
  245. }
  246. }
  247. [dir="rtl"] body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  248. margin-left: auto;
  249. margin-left: auto;
  250. margin-right: 240px;
  251. margin-right: 15rem;
  252. }
  253. @media print {
  254. [dir="rtl"] body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  255. margin-right: 0;
  256. }
  257. }
  258. /**
  259. * ToolBar tray orientation toggle.
  260. */
  261. /* Hide the orientation toggle when the configured narrow breakpoint is not
  262. * active. */
  263. .toolbar .toolbar-tray .toolbar-toggle-orientation {
  264. display: none;
  265. }
  266. /* Show the orientation toggle when the configured narrow breakpoint is
  267. * active. */
  268. .toolbar-oriented .toolbar-tray .toolbar-toggle-orientation {
  269. display: block;
  270. }
  271. .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  272. bottom: 0;
  273. position: absolute;
  274. right: 0; /* LTR */
  275. top: auto;
  276. }
  277. [dir="rtl"] .toolbar-oriented .toolbar-tray-horizontal .toolbar-toggle-orientation {
  278. left: 0;
  279. right: auto;
  280. }
  281. .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  282. float: right; /* LTR */
  283. width: 100%;
  284. }
  285. [dir="rtl"] .toolbar-oriented .toolbar-tray-vertical .toolbar-toggle-orientation {
  286. float: left;
  287. }
  288. /**
  289. * Toolbar home button toggle.
  290. */
  291. .toolbar .toolbar-bar .home-toolbar-tab {
  292. display: none;
  293. }
  294. .path-admin .toolbar-bar .home-toolbar-tab {
  295. display: block;
  296. }