toolbar.module.css

toolbar.module.css

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

File

drupal/core/modules/toolbar/css/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. html.js #toolbar-administration,
  9. html .toolbar * {
  10. -moz-box-sizing: border-box;
  11. -o-box-sizing: border-box;
  12. -webkit-box-sizing: border-box;
  13. box-sizing: border-box;
  14. margin: 0;
  15. padding: 0;
  16. vertical-align: baseline;
  17. }
  18. html.js #toolbar-administration {
  19. font-size: small;
  20. line-height: 1;
  21. }
  22. html.js .toolbar {
  23. left: 0; /* LTR */
  24. position: absolute;
  25. top: 0;
  26. width: 100%;
  27. }
  28. /**
  29. * Very specific overrides for Drupal system CSS.
  30. */
  31. .toolbar li,
  32. .toolbar .menu li,
  33. .toolbar .item-list,
  34. .toolbar .item-list li,
  35. .toolbar .menu li.expanded {
  36. list-style-type: none;
  37. list-style-image: none;
  38. }
  39. .toolbar .menu li {
  40. padding-top: 0;
  41. }
  42. .js .toolbar .bar .tab,
  43. .js .toolbar .menu li {
  44. display: block;
  45. }
  46. .js .toolbar .bar .tab,
  47. .js .toolbar .horizontal .tab {
  48. float: left; /* LTR */
  49. }
  50. .js .toolbar a {
  51. display: block;
  52. line-height: 1;
  53. }
  54. /**
  55. * Administration menu.
  56. */
  57. .js .toolbar .bar {
  58. left: 0; /* LTR */
  59. position: absolute;
  60. top: 0;
  61. z-index: 1250;
  62. width: 100%;
  63. }
  64. @media only screen {
  65. .js .toolbar .bar .tab,
  66. .js .toolbar .tray li {
  67. float: none; /* LTR */
  68. }
  69. }
  70. @media only screen and (min-width: 16.5em) {
  71. .js .toolbar .bar .tab,
  72. .js .toolbar .horizontal li {
  73. float: left; /* LTR */
  74. }
  75. }
  76. @media only screen and (min-width: 28.125em) {
  77. .js .toolbar .bar {
  78. position: fixed;
  79. }
  80. }
  81. /**
  82. * Toolbar tray.
  83. */
  84. .js .toolbar .tray {
  85. display: none;
  86. position: fixed;
  87. }
  88. /* Make vertical toolbar tray scroll with page for touch devices. */
  89. .touch .toolbar .tray {
  90. position: absolute;
  91. }
  92. .toolbar .tray {
  93. z-index: 1200;
  94. }
  95. .toolbar .horizontal {
  96. width: 100%;
  97. }
  98. .toolbar .vertical,
  99. .toolbar .vertical > .lining:before {
  100. bottom: 0;
  101. width: 240px;
  102. width: 15rem;
  103. }
  104. .toolbar .vertical {
  105. left: -100%; /* LTR */
  106. position: absolute;
  107. }
  108. .toolbar .horizontal {
  109. left: 0; /* LTR */
  110. height: 0;
  111. /* Set one higher than the contextual links gear. */
  112. z-index: 1000;
  113. }
  114. .toolar .tray .lining {
  115. position: relative;
  116. }
  117. .toolbar .vertical > .lining,
  118. .toolbar .vertical > .lining:before {
  119. left: -100%; /* LTR */
  120. min-height: 100%;
  121. overflow-x: hidden;
  122. overflow-y: auto;
  123. position: absolute;
  124. width: 100%;
  125. }
  126. .toolbar .vertical > .lining:before {
  127. bottom: 0;
  128. -moz-box-sizing: content-box;
  129. -o-box-sizing: content-box;
  130. -webkit-box-sizing: content-box;
  131. box-sizing: content-box;
  132. content: '';
  133. display: none;
  134. height: 100%;
  135. /* Support for devices that do not support position fixed. */
  136. position: absolute;
  137. position: fixed;
  138. top: 0;
  139. z-index: -1;
  140. }
  141. .toolbar .tray.active {
  142. display: block;
  143. }
  144. .toolbar .horizontal.active {
  145. height: auto;
  146. }
  147. .toolbar .vertical.active,
  148. .toolbar .vertical.active > .lining {
  149. bottom: 0;
  150. left: 0; /* LTR */
  151. top: 0;
  152. }
  153. /* Make vertical toolbar tray scroll with page for touch devices. */
  154. .touch .toolbar .vertical.active,
  155. .touch .toolbar .vertical.active > .lining {
  156. bottom: auto;
  157. top: auto;
  158. }
  159. .toolbar .horizontal .menu li ul {
  160. display: none;
  161. }
  162. @media only screen {
  163. .toolbar .vertical,
  164. .toolbar .vertical > .lining:before {
  165. bottom: auto;
  166. width: 100%;
  167. }
  168. }
  169. @media only screen and (min-width: 16.5em) {
  170. .toolbar .vertical {
  171. bottom: 0;
  172. }
  173. .toolbar .vertical,
  174. .toolbar .vertical > .lining:before {
  175. width: 240px;
  176. width: 15rem;
  177. }
  178. .toolbar .vertical.active > .lining:before {
  179. display: block;
  180. left: -1px; /* LTR */
  181. }
  182. }
  183. @media only screen and (min-width: 28.125em) {
  184. .toolbar .tray.horizontal {
  185. position: fixed;
  186. }
  187. }
  188. /**
  189. * At larger screen sizes, the tray pushes the page content.
  190. */
  191. @media only screen and (min-width: 38.125em) {
  192. body.toolbar-tray-open.toolbar-vertical {
  193. margin-left: 240px; /* LTR */
  194. margin-left: 15rem; /* LTR */
  195. }
  196. }
  197. /**
  198. * ToolBar tray orientation toggle.
  199. *
  200. * Hide the orientation toggle from browsers that do not interpret
  201. * media queries. They get a standard horizontal toolbar.
  202. */
  203. .toolbar .horizontal .toggle-orientation {
  204. display: none;
  205. }
  206. @media only screen {
  207. .toolbar .tray .toggle-orientation {
  208. display: none;
  209. }
  210. }
  211. @media only screen and (min-width: 16.5em) {
  212. .toolbar .tray .toggle-orientation {
  213. display: block;
  214. }
  215. }
  216. .toolbar .horizontal .toggle-orientation {
  217. bottom: 0;
  218. position: absolute;
  219. right: 0; /* LTR */
  220. top: 0;
  221. }
  222. .toolbar .vertical .toggle-orientation {
  223. float: right; /* LTR */
  224. width: 100%;
  225. }