You are here

navbar.module.css in Navbar 7

navbar.module.css

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

File

css/navbar.module.css
View source
  1. /**
  2. * @file navbar.module.css
  3. *
  4. *
  5. * Aggressive resets so we can achieve a consistent look in hostile CSS
  6. * environments.
  7. */
  8. #navbar-administration,
  9. #navbar-administration *:not(select) {
  10. /* IE8 is the only browser we support that can't handle the :not
  11. * pseudo-selector. If users really want Navbar support in IE8 on sites with
  12. * themes that don't properly encapsulate their CSS, then they're going to
  13. * need to write that patch :) The reset is not strictly speaking, necessary.
  14. * It is provided as a convenience to protect again style bleed from themes
  15. * and modules that don't properly scope styling.
  16. *
  17. * The select element completely blows up if its properties are reset.
  18. */
  19. background-attachment: scroll;
  20. background-color: transparent;
  21. background-image: none;
  22. background-position: 0% 0%;
  23. background-repeat: no-repeat;
  24. border: none;
  25. -moz-box-shadow: none;
  26. box-shadow: none;
  27. -moz-box-sizing: border-box;
  28. -webkit-box-sizing: border-box;
  29. box-sizing: border-box;
  30. bottom: auto;
  31. color: black;
  32. content: normal;
  33. counter-increment: none;
  34. counter-reset: none;
  35. direction: ltr;
  36. float: none;
  37. font-style: normal;
  38. font-weight: normal;
  39. height: auto;
  40. left: auto;
  41. letter-spacing: normal;
  42. line-height: 1;
  43. list-style: none;
  44. margin: 0;
  45. max-height: none;
  46. max-width: none;
  47. min-height: 0;
  48. min-width: 0;
  49. orphans: 2;
  50. outline: none;
  51. outline-color: invert;
  52. outline-style: none;
  53. outline-width: medium;
  54. overflow: visible;
  55. padding: 0;
  56. page-break-after: auto;
  57. page-break-before: auto;
  58. page-break-inside: auto;
  59. position: static;
  60. right: auto;
  61. table-layout: auto;
  62. text-decoration: none;
  63. text-indent: 0;
  64. text-transform: none;
  65. top: auto;
  66. vertical-align: baseline;
  67. visibility: visible;
  68. widows: 2;
  69. z-index: auto;
  70. unicode-bidi: normal;
  71. white-space: normal;
  72. width: auto;
  73. word-spacing: normal;
  74. }
  75. /* These styles will cascade. There is no need to star-select child elements. */
  76. #navbar-administration {
  77. font-family: sans-serif;
  78. font-size: small;
  79. }
  80. #navbar-administration select,
  81. #navbar-administration optgroup,
  82. #navbar-administration option,
  83. #navbar-administration button {
  84. color: black;
  85. }
  86. #navbar-administration select {
  87. background-image: none;
  88. border-radius: none;
  89. box-shadow: none;
  90. font-weight: normal;
  91. margin: 0;
  92. padding: 0;
  93. vertical-align: baseline;
  94. }
  95. /* Make select boxes look pretty in webkit */
  96. #navbar-administration :-webkit-any(select) {
  97. -webkit-appearance: menulist-button;
  98. background-color: lightgray;
  99. }
  100. /* Make select boxes look pretty in Gecko */
  101. #navbar-administration select {
  102. -moz-appearance: menulist-textfield;
  103. appearance: menulist-textfield;
  104. height: 2em;
  105. padding: 2px 1em 0 0;
  106. }
  107. /* tables still need 'cellspacing="0"' in the markup */
  108. #navbar-administration table {
  109. border-collapse: collapse;
  110. border-spacing: 0;
  111. }
  112. #navbar-administration caption,
  113. #navbar-administration th,
  114. #navbar-administration td {
  115. text-align: left;
  116. font-weight: normal;
  117. }
  118. #navbar-administration blockquote:before,
  119. #navbar-administration blockquote:after,
  120. #navbar-administration q:before,
  121. #navbar-administration q:after {
  122. content: "";
  123. }
  124. #navbar-administration blockquote,
  125. #navbar-administration q {
  126. quotes: "" "";
  127. }
  128. #navbar-administration ul.navbar-menu {
  129. border: none;
  130. list-style: none;
  131. text-align: left; /* LTR */
  132. }
  133. /* @end */
  134. /**
  135. * Very specific overrides for Drupal system CSS.
  136. */
  137. #navbar-administration li,
  138. #navbar-administration .navbar-menu li,
  139. #navbar-administration .item-list,
  140. #navbar-administration .item-list li,
  141. #navbar-administration .navbar-menu li.expanded {
  142. list-style-type: none;
  143. list-style-image: none;
  144. padding: 0;
  145. }
  146. /* Override core system.menus.css */
  147. #navbar-administration ul.navbar-menu li,
  148. /* Override overzealous menu styling in themes. */
  149. #navbar-administration .navbar-menu-root li {
  150. margin: 0;
  151. }
  152. #navbar-administration .navbar-menu li {
  153. padding-top: 0;
  154. }
  155. #navbar-administration .navbar-bar .navbar-tab,
  156. #navbar-administration .navbar-menu li {
  157. display: block;
  158. }
  159. #navbar-administration .navbar-tab > *,
  160. #navbar-administration .navbar-menu-item,
  161. /* On behalf of shortcut module */
  162. #navbar-administration .navbar-tray .edit-shortcuts {
  163. display: block;
  164. line-height: 1;
  165. }
  166. /**
  167. * Administration menu.
  168. */
  169. #navbar-administration .navbar-bar,
  170. #navbar-administration .navbar-tray {
  171. position: relative;
  172. z-index: 1250;
  173. }
  174. /* Position the admin navbar absolutely when the configured standard breakpoint
  175. * is active. The navbar container, that contains the bar and the trays, is
  176. * position absolutely so that it scrolls with the page. Otherwise, on smaller
  177. * screens, the components of the admin navbar are positioned statically. */
  178. body.navbar-fixed #navbar-administration.navbar-oriented,
  179. #navbar-administration.navbar-oriented .navbar-bar,
  180. #navbar-administration.navbar-oriented .navbar-tray {
  181. left: 0;
  182. position: absolute;
  183. right: 0;
  184. top: 0;
  185. }
  186. /* Layer the bar just above the trays and above contextual link triggers. */
  187. #navbar-administration.navbar-oriented .navbar-bar {
  188. z-index: 502;
  189. }
  190. /* Position the admin navbar fixed when the configured standard breakpoint is
  191. * active. */
  192. body.navbar-fixed #navbar-administration.navbar-oriented .navbar-bar {
  193. position: fixed;
  194. }
  195. /* When the configured narrow breakpoint is active, the navbar is sized to wrap
  196. * around the trays in order to provide a context for scrolling tray content
  197. * that is taller than the viewport. */
  198. body.navbar-tray-open.navbar-fixed.navbar-vertical #navbar-administration.navbar-oriented {
  199. bottom: 0;
  200. width: 240px;
  201. width: 15rem;
  202. }
  203. /* Present the admin navbar tabs horizontally as a default on user agents that
  204. * do not understand media queries or on user agents where JavaScript is
  205. * disabled. */
  206. #navbar-administration .navbar-bar .navbar-tab,
  207. #navbar-administration .navbar-tray-horizontal li {
  208. float: left; /* LTR */
  209. }
  210. /* Present the admin navbar tabs vertically by default on user agents that
  211. * that understand media queries. This will be the small screen default. */
  212. @media only screen {
  213. #navbar-administration .navbar-bar .navbar-tab,
  214. #navbar-administration .navbar-tray-horizontal li {
  215. float: none; /* LTR */
  216. }
  217. }
  218. /* This min-width media query is meant to provide basic horizontal layout to
  219. * the main menu tabs when JavaScript is disabled on user agents that understand
  220. * media queries. */
  221. @media (min-width:16.5em) {
  222. #navbar-administration .navbar-bar .navbar-tab,
  223. #navbar-administration .navbar-tray-horizontal li {
  224. float: left; /* LTR */
  225. }
  226. }
  227. /* Present the admin navbar tabs horizontally when the configured narrow
  228. * breakpoint is active. */
  229. #navbar-administration.navbar-oriented .navbar-bar .navbar-tab,
  230. #navbar-administration.navbar-oriented .navbar-tray-horizontal li {
  231. float: left; /* LTR */
  232. }
  233. /**
  234. * Navbar tray.
  235. */
  236. #navbar-administration .navbar-tray {
  237. display: none;
  238. z-index: 501;
  239. }
  240. #navbar-administration.navbar-oriented .navbar-tray-vertical {
  241. left: -100%; /* LTR */
  242. position: absolute;
  243. width: 240px;
  244. width: 15rem;
  245. }
  246. #navbar-administration .navbar-tray-vertical > .navbar-lining {
  247. min-height: 100%;
  248. }
  249. #navbar-administration .navbar-tray-vertical > .navbar-lining:before {
  250. width: 100%;
  251. }
  252. #navbar-administration.navbar-oriented .navbar-tray-vertical > .navbar-lining:before {
  253. bottom: 0;
  254. content: '';
  255. display: block;
  256. left: 0; /* LTR */
  257. position: fixed;
  258. top: 0;
  259. width: 240px;
  260. width: 14rem;
  261. z-index: -1;
  262. }
  263. /* Hide secondary menus when the tray is horizontal. */
  264. #navbar-administration.navbar-oriented .navbar-tray-horizontal .navbar-menu li ul {
  265. display: none;
  266. }
  267. /* When the configured standard breakpoint is active and the tray is in a
  268. * horizontal position, the tray is fixed to the top of the viewport and does
  269. * not scroll with the page contents. */
  270. body.navbar-fixed #navbar-administration .navbar-tray-horizontal {
  271. position: fixed;
  272. }
  273. /* When the configured standard breakpoint is active and the tray is in a
  274. * vertical position, the tray does not scroll with the page. The contents of
  275. * the tray scroll within the confines of the viewport. */
  276. body.navbar-fixed #navbar-administration .navbar-tray-vertical {
  277. height: 100%;
  278. overflow-x: hidden;
  279. overflow-y: auto;
  280. position: fixed;
  281. }
  282. #navbar-administration .navbar-tray.navbar-active {
  283. display: block;
  284. }
  285. /* Bring the tray into the viewport. By default it is just off-screen. */
  286. #navbar-administration.navbar-oriented .navbar-tray-vertical.navbar-active {
  287. left: 0; /* LTR */
  288. }
  289. /* When the configured standard breakpoint is active, the tray appears to push
  290. * the page content away from the edge of the viewport. */
  291. body.navbar-tray-open.navbar-vertical.navbar-fixed {
  292. margin-left: 240px; /* LTR */
  293. margin-left: 15rem; /* LTR */
  294. }
  295. /**
  296. * ToolBar tray orientation toggle.
  297. */
  298. /* Hide the orientation toggle when the configured narrow breakpoint is not
  299. * active. */
  300. #navbar-administration .navbar-tray .navbar-toggle-orientation {
  301. display: none;
  302. }
  303. /* Show the orientation toggle when the configured narrow breakpoint is
  304. * active. */
  305. #navbar-administration.navbar-oriented .navbar-tray .navbar-toggle-orientation {
  306. display: block;
  307. }
  308. #navbar-administration.navbar-oriented .navbar-tray-horizontal .navbar-toggle-orientation {
  309. bottom: 0;
  310. position: absolute;
  311. right: 0; /* LTR */
  312. top: auto;
  313. }
  314. #navbar-administration.navbar-oriented .navbar-tray-vertical .navbar-toggle-orientation {
  315. float: right; /* LTR */
  316. width: 100%;
  317. }