mdc.top-app-bar.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://github.com/material-components/material-components-web/blob/master/LICENSE
  7. */
  8. .mdc-top-app-bar {
  9. background-color: #6200ee;
  10. /* @alternate */
  11. background-color: var(--mdc-theme-primary, #6200ee);
  12. color: white;
  13. display: flex;
  14. position: fixed;
  15. flex-direction: column;
  16. justify-content: space-between;
  17. box-sizing: border-box;
  18. width: 100%;
  19. z-index: 4;
  20. }
  21. .mdc-top-app-bar .mdc-top-app-bar__action-item,
  22. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon {
  23. color: #fff;
  24. /* @alternate */
  25. color: var(--mdc-theme-on-primary, #fff);
  26. }
  27. .mdc-top-app-bar .mdc-top-app-bar__action-item::before, .mdc-top-app-bar .mdc-top-app-bar__action-item::after,
  28. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon::before,
  29. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon::after {
  30. background-color: #fff;
  31. /* @alternate */
  32. background-color: var(--mdc-ripple-color, var(--mdc-theme-on-primary, #fff));
  33. }
  34. .mdc-top-app-bar .mdc-top-app-bar__action-item:hover::before, .mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-surface--hover::before,
  35. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon:hover::before,
  36. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-surface--hover::before {
  37. opacity: 0.08;
  38. /* @alternate */
  39. opacity: var(--mdc-ripple-hover-opacity, 0.08);
  40. }
  41. .mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-upgraded--background-focused::before, .mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded):focus::before,
  42. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded--background-focused::before,
  43. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded):focus::before {
  44. transition-duration: 75ms;
  45. opacity: 0.24;
  46. /* @alternate */
  47. opacity: var(--mdc-ripple-focus-opacity, 0.24);
  48. }
  49. .mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded)::after,
  50. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded)::after {
  51. transition: opacity 150ms linear;
  52. }
  53. .mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded):active::after,
  54. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded):active::after {
  55. transition-duration: 75ms;
  56. opacity: 0.24;
  57. /* @alternate */
  58. opacity: var(--mdc-ripple-press-opacity, 0.24);
  59. }
  60. .mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-upgraded,
  61. .mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded {
  62. --mdc-ripple-fg-opacity: var(--mdc-ripple-press-opacity, 0.24);
  63. }
  64. .mdc-top-app-bar__row {
  65. display: flex;
  66. position: relative;
  67. box-sizing: border-box;
  68. width: 100%;
  69. height: 64px;
  70. }
  71. .mdc-top-app-bar__section {
  72. display: inline-flex;
  73. flex: 1 1 auto;
  74. align-items: center;
  75. min-width: 0;
  76. padding: 8px 12px;
  77. z-index: 1;
  78. }
  79. .mdc-top-app-bar__section--align-start {
  80. justify-content: flex-start;
  81. order: -1;
  82. }
  83. .mdc-top-app-bar__section--align-end {
  84. justify-content: flex-end;
  85. order: 1;
  86. }
  87. .mdc-top-app-bar__title {
  88. -moz-osx-font-smoothing: grayscale;
  89. -webkit-font-smoothing: antialiased;
  90. font-family: Roboto, sans-serif;
  91. /* @alternate */
  92. font-family: var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));
  93. font-size: 1.25rem;
  94. /* @alternate */
  95. font-size: var(--mdc-typography-headline6-font-size, 1.25rem);
  96. line-height: 2rem;
  97. /* @alternate */
  98. line-height: var(--mdc-typography-headline6-line-height, 2rem);
  99. font-weight: 500;
  100. /* @alternate */
  101. font-weight: var(--mdc-typography-headline6-font-weight, 500);
  102. letter-spacing: 0.0125em;
  103. /* @alternate */
  104. letter-spacing: var(--mdc-typography-headline6-letter-spacing, 0.0125em);
  105. text-decoration: inherit;
  106. /* @alternate */
  107. -webkit-text-decoration: var(--mdc-typography-headline6-text-decoration, inherit);
  108. text-decoration: var(--mdc-typography-headline6-text-decoration, inherit);
  109. text-transform: inherit;
  110. /* @alternate */
  111. text-transform: var(--mdc-typography-headline6-text-transform, inherit);
  112. /* @noflip */
  113. /*rtl:ignore*/
  114. padding-left: 20px;
  115. /* @noflip */
  116. /*rtl:ignore*/
  117. padding-right: 0;
  118. text-overflow: ellipsis;
  119. white-space: nowrap;
  120. overflow: hidden;
  121. z-index: 1;
  122. }
  123. [dir=rtl] .mdc-top-app-bar__title, .mdc-top-app-bar__title[dir=rtl] {
  124. /*rtl:begin:ignore*/
  125. /* @noflip */
  126. /*rtl:ignore*/
  127. padding-left: 0;
  128. /* @noflip */
  129. /*rtl:ignore*/
  130. padding-right: 20px;
  131. /*rtl:end:ignore*/
  132. }
  133. .mdc-top-app-bar--short-collapsed {
  134. /* @noflip */
  135. /*rtl:ignore*/
  136. border-top-left-radius: 0;
  137. /* @noflip */
  138. /*rtl:ignore*/
  139. border-top-right-radius: 0;
  140. /* @noflip */
  141. /*rtl:ignore*/
  142. border-bottom-right-radius: 24px;
  143. /* @noflip */
  144. /*rtl:ignore*/
  145. border-bottom-left-radius: 0;
  146. }
  147. [dir=rtl] .mdc-top-app-bar--short-collapsed, .mdc-top-app-bar--short-collapsed[dir=rtl] {
  148. /*rtl:begin:ignore*/
  149. /* @noflip */
  150. /*rtl:ignore*/
  151. border-top-left-radius: 0;
  152. /* @noflip */
  153. /*rtl:ignore*/
  154. border-top-right-radius: 0;
  155. /* @noflip */
  156. /*rtl:ignore*/
  157. border-bottom-right-radius: 0;
  158. /* @noflip */
  159. /*rtl:ignore*/
  160. border-bottom-left-radius: 24px;
  161. /*rtl:end:ignore*/
  162. }
  163. .mdc-top-app-bar--short {
  164. top: 0;
  165. /* @noflip */
  166. /*rtl:ignore*/
  167. right: auto;
  168. /* @noflip */
  169. /*rtl:ignore*/
  170. left: 0;
  171. width: 100%;
  172. transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
  173. }
  174. [dir=rtl] .mdc-top-app-bar--short, .mdc-top-app-bar--short[dir=rtl] {
  175. /*rtl:begin:ignore*/
  176. /* @noflip */
  177. /*rtl:ignore*/
  178. right: 0;
  179. /* @noflip */
  180. /*rtl:ignore*/
  181. left: auto;
  182. /*rtl:end:ignore*/
  183. }
  184. .mdc-top-app-bar--short .mdc-top-app-bar__row {
  185. height: 56px;
  186. }
  187. .mdc-top-app-bar--short .mdc-top-app-bar__section {
  188. padding: 4px;
  189. }
  190. .mdc-top-app-bar--short .mdc-top-app-bar__title {
  191. transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
  192. opacity: 1;
  193. }
  194. .mdc-top-app-bar--short-collapsed {
  195. box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
  196. width: 56px;
  197. transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
  198. }
  199. .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__title {
  200. display: none;
  201. }
  202. .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__action-item {
  203. transition: padding 150ms cubic-bezier(0.4, 0, 0.2, 1);
  204. }
  205. .mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item {
  206. width: 112px;
  207. }
  208. .mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end {
  209. /* @noflip */
  210. /*rtl:ignore*/
  211. padding-left: 0;
  212. /* @noflip */
  213. /*rtl:ignore*/
  214. padding-right: 12px;
  215. }
  216. [dir=rtl] .mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end, .mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end[dir=rtl] {
  217. /*rtl:begin:ignore*/
  218. /* @noflip */
  219. /*rtl:ignore*/
  220. padding-left: 12px;
  221. /* @noflip */
  222. /*rtl:ignore*/
  223. padding-right: 0;
  224. /*rtl:end:ignore*/
  225. }
  226. .mdc-top-app-bar--dense .mdc-top-app-bar__row {
  227. height: 48px;
  228. }
  229. .mdc-top-app-bar--dense .mdc-top-app-bar__section {
  230. padding: 0 4px;
  231. }
  232. .mdc-top-app-bar--dense .mdc-top-app-bar__title {
  233. /* @noflip */
  234. /*rtl:ignore*/
  235. padding-left: 12px;
  236. /* @noflip */
  237. /*rtl:ignore*/
  238. padding-right: 0;
  239. }
  240. [dir=rtl] .mdc-top-app-bar--dense .mdc-top-app-bar__title, .mdc-top-app-bar--dense .mdc-top-app-bar__title[dir=rtl] {
  241. /*rtl:begin:ignore*/
  242. /* @noflip */
  243. /*rtl:ignore*/
  244. padding-left: 0;
  245. /* @noflip */
  246. /*rtl:ignore*/
  247. padding-right: 12px;
  248. /*rtl:end:ignore*/
  249. }
  250. .mdc-top-app-bar--prominent .mdc-top-app-bar__row {
  251. height: 128px;
  252. }
  253. .mdc-top-app-bar--prominent .mdc-top-app-bar__title {
  254. align-self: flex-end;
  255. padding-bottom: 2px;
  256. }
  257. .mdc-top-app-bar--prominent .mdc-top-app-bar__action-item,
  258. .mdc-top-app-bar--prominent .mdc-top-app-bar__navigation-icon {
  259. align-self: flex-start;
  260. }
  261. .mdc-top-app-bar--fixed {
  262. transition: box-shadow 200ms linear;
  263. }
  264. .mdc-top-app-bar--fixed-scrolled {
  265. box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
  266. transition: box-shadow 200ms linear;
  267. }
  268. .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__row {
  269. height: 96px;
  270. }
  271. .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__section {
  272. padding: 0 12px;
  273. }
  274. .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title {
  275. /* @noflip */
  276. /*rtl:ignore*/
  277. padding-left: 20px;
  278. /* @noflip */
  279. /*rtl:ignore*/
  280. padding-right: 0;
  281. padding-bottom: 9px;
  282. }
  283. [dir=rtl] .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title, .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title[dir=rtl] {
  284. /*rtl:begin:ignore*/
  285. /* @noflip */
  286. /*rtl:ignore*/
  287. padding-left: 0;
  288. /* @noflip */
  289. /*rtl:ignore*/
  290. padding-right: 20px;
  291. /*rtl:end:ignore*/
  292. }
  293. .mdc-top-app-bar--fixed-adjust {
  294. padding-top: 64px;
  295. }
  296. .mdc-top-app-bar--dense-fixed-adjust {
  297. padding-top: 48px;
  298. }
  299. .mdc-top-app-bar--short-fixed-adjust {
  300. padding-top: 56px;
  301. }
  302. .mdc-top-app-bar--prominent-fixed-adjust {
  303. padding-top: 128px;
  304. }
  305. .mdc-top-app-bar--dense-prominent-fixed-adjust {
  306. padding-top: 96px;
  307. }
  308. @media (max-width: 599px) {
  309. .mdc-top-app-bar__row {
  310. height: 56px;
  311. }
  312. .mdc-top-app-bar__section {
  313. padding: 4px;
  314. }
  315. .mdc-top-app-bar--short {
  316. transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1);
  317. }
  318. .mdc-top-app-bar--short-collapsed {
  319. transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
  320. }
  321. .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end {
  322. /* @noflip */
  323. /*rtl:ignore*/
  324. padding-left: 0;
  325. /* @noflip */
  326. /*rtl:ignore*/
  327. padding-right: 12px;
  328. }
  329. [dir=rtl] .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end, .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end[dir=rtl] {
  330. /*rtl:begin:ignore*/
  331. /* @noflip */
  332. /*rtl:ignore*/
  333. padding-left: 12px;
  334. /* @noflip */
  335. /*rtl:ignore*/
  336. padding-right: 0;
  337. /*rtl:end:ignore*/
  338. }
  339. .mdc-top-app-bar--prominent .mdc-top-app-bar__title {
  340. padding-bottom: 6px;
  341. }
  342. .mdc-top-app-bar--fixed-adjust {
  343. padding-top: 56px;
  344. }
  345. }
  346. /*# sourceMappingURL=mdc.top-app-bar.css.map*/