UNPKG

10.4 kBCSSView Raw
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
134.mdc-top-app-bar--short-collapsed {
135 /* @noflip */
136 /*rtl:ignore*/
137 border-top-left-radius: 0;
138 /* @noflip */
139 /*rtl:ignore*/
140 border-top-right-radius: 0;
141 /* @noflip */
142 /*rtl:ignore*/
143 border-bottom-right-radius: 24px;
144 /* @noflip */
145 /*rtl:ignore*/
146 border-bottom-left-radius: 0;
147}
148[dir=rtl] .mdc-top-app-bar--short-collapsed, .mdc-top-app-bar--short-collapsed[dir=rtl] {
149 /*rtl:begin:ignore*/
150 /* @noflip */
151 /*rtl:ignore*/
152 border-top-left-radius: 0;
153 /* @noflip */
154 /*rtl:ignore*/
155 border-top-right-radius: 0;
156 /* @noflip */
157 /*rtl:ignore*/
158 border-bottom-right-radius: 0;
159 /* @noflip */
160 /*rtl:ignore*/
161 border-bottom-left-radius: 24px;
162 /*rtl:end:ignore*/
163}
164
165.mdc-top-app-bar--short {
166 top: 0;
167 /* @noflip */
168 /*rtl:ignore*/
169 right: auto;
170 /* @noflip */
171 /*rtl:ignore*/
172 left: 0;
173 width: 100%;
174 transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
175}
176[dir=rtl] .mdc-top-app-bar--short, .mdc-top-app-bar--short[dir=rtl] {
177 /*rtl:begin:ignore*/
178 /* @noflip */
179 /*rtl:ignore*/
180 right: 0;
181 /* @noflip */
182 /*rtl:ignore*/
183 left: auto;
184 /*rtl:end:ignore*/
185}
186
187.mdc-top-app-bar--short .mdc-top-app-bar__row {
188 height: 56px;
189}
190.mdc-top-app-bar--short .mdc-top-app-bar__section {
191 padding: 4px;
192}
193.mdc-top-app-bar--short .mdc-top-app-bar__title {
194 transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
195 opacity: 1;
196}
197
198.mdc-top-app-bar--short-collapsed {
199 /* @alternate */
200 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);
201 width: 56px;
202 transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
203}
204.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__title {
205 display: none;
206}
207.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__action-item {
208 transition: padding 150ms cubic-bezier(0.4, 0, 0.2, 1);
209}
210
211.mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item {
212 width: 112px;
213}
214.mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end {
215 /* @noflip */
216 /*rtl:ignore*/
217 padding-left: 0;
218 /* @noflip */
219 /*rtl:ignore*/
220 padding-right: 12px;
221}
222[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] {
223 /*rtl:begin:ignore*/
224 /* @noflip */
225 /*rtl:ignore*/
226 padding-left: 12px;
227 /* @noflip */
228 /*rtl:ignore*/
229 padding-right: 0;
230 /*rtl:end:ignore*/
231}
232
233.mdc-top-app-bar--dense .mdc-top-app-bar__row {
234 height: 48px;
235}
236.mdc-top-app-bar--dense .mdc-top-app-bar__section {
237 padding: 0 4px;
238}
239.mdc-top-app-bar--dense .mdc-top-app-bar__title {
240 /* @noflip */
241 /*rtl:ignore*/
242 padding-left: 12px;
243 /* @noflip */
244 /*rtl:ignore*/
245 padding-right: 0;
246}
247[dir=rtl] .mdc-top-app-bar--dense .mdc-top-app-bar__title, .mdc-top-app-bar--dense .mdc-top-app-bar__title[dir=rtl] {
248 /*rtl:begin:ignore*/
249 /* @noflip */
250 /*rtl:ignore*/
251 padding-left: 0;
252 /* @noflip */
253 /*rtl:ignore*/
254 padding-right: 12px;
255 /*rtl:end:ignore*/
256}
257
258.mdc-top-app-bar--prominent .mdc-top-app-bar__row {
259 height: 128px;
260}
261.mdc-top-app-bar--prominent .mdc-top-app-bar__title {
262 align-self: flex-end;
263 padding-bottom: 2px;
264}
265.mdc-top-app-bar--prominent .mdc-top-app-bar__action-item,
266.mdc-top-app-bar--prominent .mdc-top-app-bar__navigation-icon {
267 align-self: flex-start;
268}
269
270.mdc-top-app-bar--fixed {
271 transition: box-shadow 200ms linear;
272}
273
274.mdc-top-app-bar--fixed-scrolled {
275 /* @alternate */
276 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);
277 transition: box-shadow 200ms linear;
278}
279
280.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__row {
281 height: 96px;
282}
283.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__section {
284 padding: 0 12px;
285}
286.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title {
287 /* @noflip */
288 /*rtl:ignore*/
289 padding-left: 20px;
290 /* @noflip */
291 /*rtl:ignore*/
292 padding-right: 0;
293 padding-bottom: 9px;
294}
295[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] {
296 /*rtl:begin:ignore*/
297 /* @noflip */
298 /*rtl:ignore*/
299 padding-left: 0;
300 /* @noflip */
301 /*rtl:ignore*/
302 padding-right: 20px;
303 /*rtl:end:ignore*/
304}
305
306.mdc-top-app-bar--fixed-adjust {
307 padding-top: 64px;
308}
309
310.mdc-top-app-bar--dense-fixed-adjust {
311 padding-top: 48px;
312}
313
314.mdc-top-app-bar--short-fixed-adjust {
315 padding-top: 56px;
316}
317
318.mdc-top-app-bar--prominent-fixed-adjust {
319 padding-top: 128px;
320}
321
322.mdc-top-app-bar--dense-prominent-fixed-adjust {
323 padding-top: 96px;
324}
325
326@media (max-width: 599px) {
327 .mdc-top-app-bar__row {
328 height: 56px;
329 }
330
331 .mdc-top-app-bar__section {
332 padding: 4px;
333 }
334
335 .mdc-top-app-bar--short {
336 transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1);
337 }
338
339 .mdc-top-app-bar--short-collapsed {
340 transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
341 }
342 .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end {
343 /* @noflip */
344 /*rtl:ignore*/
345 padding-left: 0;
346 /* @noflip */
347 /*rtl:ignore*/
348 padding-right: 12px;
349 }
350 [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] {
351 /*rtl:begin:ignore*/
352 /* @noflip */
353 /*rtl:ignore*/
354 padding-left: 12px;
355 /* @noflip */
356 /*rtl:ignore*/
357 padding-right: 0;
358 /*rtl:end:ignore*/
359 }
360
361 .mdc-top-app-bar--prominent .mdc-top-app-bar__title {
362 padding-bottom: 6px;
363 }
364
365 .mdc-top-app-bar--fixed-adjust {
366 padding-top: 56px;
367 }
368}
369
370/*# sourceMappingURL=mdc.top-app-bar.css.map*/
\No newline at end of file