UNPKG

preact-material-components

Version:
306 lines (285 loc) 12.4 kB
/*! Material Components for the Web Copyright (c) 2018 Google Inc. License: Apache-2.0 */ .mdc-top-app-bar { background-color: #6200ee; /* @alternate */ background-color: var(--mdc-theme-primary, #6200ee); color: white; display: flex; position: fixed; flex-direction: column; justify-content: space-between; box-sizing: border-box; width: 100%; z-index: 4; } .mdc-top-app-bar .mdc-top-app-bar__action-item, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon { color: #fff; /* @alternate */ color: var(--mdc-theme-on-primary, #fff); } .mdc-top-app-bar .mdc-top-app-bar__action-item::before, .mdc-top-app-bar .mdc-top-app-bar__action-item::after, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon::before, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon::after { background-color: #fff; } @supports not (-ms-ime-align: auto) { .mdc-top-app-bar .mdc-top-app-bar__action-item::before, .mdc-top-app-bar .mdc-top-app-bar__action-item::after, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon::before, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon::after { /* @alternate */ background-color: var(--mdc-theme-on-primary, #fff); } } .mdc-top-app-bar .mdc-top-app-bar__action-item:hover::before, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon:hover::before { opacity: 0.08; } .mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded):focus::before, .mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-upgraded--background-focused::before, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded):focus::before, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded--background-focused::before { transition-duration: 75ms; opacity: 0.24; } .mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded)::after, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded)::after { transition: opacity 150ms linear; } .mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded):active::after, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded):active::after { transition-duration: 75ms; opacity: 0.32; } .mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-upgraded, .mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded { --mdc-ripple-fg-opacity: 0.32; } .mdc-top-app-bar__row { display: flex; position: relative; box-sizing: border-box; width: 100%; height: 64px; } .mdc-top-app-bar__section { display: inline-flex; flex: 1 1 auto; align-items: center; min-width: 0; padding: 8px 12px; z-index: 1; } .mdc-top-app-bar__section--align-start { justify-content: flex-start; order: -1; } .mdc-top-app-bar__section--align-end { justify-content: flex-end; order: 1; } .mdc-top-app-bar__title { font-family: Roboto, sans-serif; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; font-size: 1.25rem; line-height: 2rem; font-weight: 500; letter-spacing: 0.0125em; text-decoration: inherit; text-transform: inherit; /* @noflip */ padding-left: 20px; /* @noflip */ padding-right: 0; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; z-index: 1; } [dir="rtl"] .mdc-top-app-bar__title, .mdc-top-app-bar__title[dir="rtl"] { /* @noflip */ padding-left: 0; /* @noflip */ padding-right: 20px; } .mdc-top-app-bar__action-item, .mdc-top-app-bar__navigation-icon { --mdc-ripple-fg-size: 0; --mdc-ripple-left: 0; --mdc-ripple-top: 0; --mdc-ripple-fg-scale: 1; --mdc-ripple-fg-translate-end: 0; --mdc-ripple-fg-translate-start: 0; -webkit-tap-highlight-color: transparent; will-change: transform, opacity; display: flex; position: relative; flex-shrink: 0; align-items: center; justify-content: center; box-sizing: border-box; width: 48px; height: 48px; padding: 12px; border: none; outline: none; background-color: transparent; fill: currentColor; color: inherit; text-decoration: none; cursor: pointer; } .mdc-top-app-bar__action-item::before, .mdc-top-app-bar__action-item::after, .mdc-top-app-bar__navigation-icon::before, .mdc-top-app-bar__navigation-icon::after { position: absolute; border-radius: 50%; opacity: 0; pointer-events: none; content: ""; } .mdc-top-app-bar__action-item::before, .mdc-top-app-bar__navigation-icon::before { transition: opacity 15ms linear; z-index: 1; } .mdc-top-app-bar__action-item.mdc-ripple-upgraded::before, .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded::before { -webkit-transform: scale(var(--mdc-ripple-fg-scale, 1)); transform: scale(var(--mdc-ripple-fg-scale, 1)); } .mdc-top-app-bar__action-item.mdc-ripple-upgraded::after, .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded::after { top: 0; /* @noflip */ left: 0; -webkit-transform: scale(0); transform: scale(0); -webkit-transform-origin: center center; transform-origin: center center; } .mdc-top-app-bar__action-item.mdc-ripple-upgraded--unbounded::after, .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded--unbounded::after { top: var(--mdc-ripple-top, 0); /* @noflip */ left: var(--mdc-ripple-left, 0); } .mdc-top-app-bar__action-item.mdc-ripple-upgraded--foreground-activation::after, .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded--foreground-activation::after { -webkit-animation: 225ms mdc-ripple-fg-radius-in forwards, 75ms mdc-ripple-fg-opacity-in forwards; animation: 225ms mdc-ripple-fg-radius-in forwards, 75ms mdc-ripple-fg-opacity-in forwards; } .mdc-top-app-bar__action-item.mdc-ripple-upgraded--foreground-deactivation::after, .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded--foreground-deactivation::after { -webkit-animation: 150ms mdc-ripple-fg-opacity-out; animation: 150ms mdc-ripple-fg-opacity-out; -webkit-transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1)); transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1)); } .mdc-top-app-bar__action-item::before, .mdc-top-app-bar__action-item::after, .mdc-top-app-bar__navigation-icon::before, .mdc-top-app-bar__navigation-icon::after { top: calc(50% - 50%); /* @noflip */ left: calc(50% - 50%); width: 100%; height: 100%; } .mdc-top-app-bar__action-item.mdc-ripple-upgraded::before, .mdc-top-app-bar__action-item.mdc-ripple-upgraded::after, .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded::before, .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded::after { top: var(--mdc-ripple-top, calc(50% - 50%)); /* @noflip */ left: var(--mdc-ripple-left, calc(50% - 50%)); width: var(--mdc-ripple-fg-size, 100%); height: var(--mdc-ripple-fg-size, 100%); } .mdc-top-app-bar__action-item.mdc-ripple-upgraded::after, .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded::after { width: var(--mdc-ripple-fg-size, 100%); height: var(--mdc-ripple-fg-size, 100%); } .mdc-top-app-bar--short { top: 0; right: auto; left: 0; width: 100%; transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1); } [dir="rtl"] .mdc-top-app-bar--short, .mdc-top-app-bar--short[dir="rtl"] { right: 0; left: auto; } .mdc-top-app-bar--short .mdc-top-app-bar__row { height: 56px; } .mdc-top-app-bar--short .mdc-top-app-bar__section { padding: 4px; } .mdc-top-app-bar--short .mdc-top-app-bar__title { transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1); opacity: 1; } .mdc-top-app-bar--short-collapsed { /* @noflip */ border-bottom-left-radius: 0; /* @noflip */ border-bottom-right-radius: 4px; 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); width: 56px; transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1); } [dir="rtl"] .mdc-top-app-bar--short-collapsed, .mdc-top-app-bar--short-collapsed[dir="rtl"] { /* @noflip */ border-bottom-left-radius: 4px; /* @noflip */ border-bottom-right-radius: 0; } .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__title { display: none; } .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__action-item { transition: padding 150ms cubic-bezier(0.4, 0, 0.2, 1); } .mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item { width: 112px; } .mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end { /* @noflip */ padding-left: 0; /* @noflip */ padding-right: 12px; } [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"] { /* @noflip */ padding-left: 12px; /* @noflip */ padding-right: 0; } .mdc-top-app-bar--dense .mdc-top-app-bar__row { height: 48px; } .mdc-top-app-bar--dense .mdc-top-app-bar__section { padding: 0 4px; } .mdc-top-app-bar--dense .mdc-top-app-bar__title { /* @noflip */ padding-left: 12px; /* @noflip */ padding-right: 0; } [dir="rtl"] .mdc-top-app-bar--dense .mdc-top-app-bar__title, .mdc-top-app-bar--dense .mdc-top-app-bar__title[dir="rtl"] { /* @noflip */ padding-left: 0; /* @noflip */ padding-right: 12px; } .mdc-top-app-bar--prominent .mdc-top-app-bar__row { height: 128px; } .mdc-top-app-bar--prominent .mdc-top-app-bar__title { align-self: flex-end; padding-bottom: 2px; } .mdc-top-app-bar--prominent .mdc-top-app-bar__action-item, .mdc-top-app-bar--prominent .mdc-top-app-bar__navigation-icon { align-self: flex-start; } .mdc-top-app-bar--fixed { transition: box-shadow 200ms linear; } .mdc-top-app-bar--fixed-scrolled { 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); transition: box-shadow 200ms linear; } .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__row { height: 96px; } .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__section { padding: 0 12px; } .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title { /* @noflip */ padding-left: 20px; /* @noflip */ padding-right: 0; padding-bottom: 9px; } [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"] { /* @noflip */ padding-left: 0; /* @noflip */ padding-right: 20px; } .mdc-top-app-bar--fixed-adjust { padding-top: 64px; } .mdc-top-app-bar--dense-fixed-adjust { padding-top: 48px; } .mdc-top-app-bar--short-fixed-adjust { padding-top: 56px; } .mdc-top-app-bar--prominent-fixed-adjust { padding-top: 128px; } .mdc-top-app-bar--dense-prominent-fixed-adjust { padding-top: 96px; } @media (max-width: 599px) { .mdc-top-app-bar__row { height: 56px; } .mdc-top-app-bar__section { padding: 4px; } .mdc-top-app-bar--short { transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1); } .mdc-top-app-bar--short-collapsed { transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1); } .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end { /* @noflip */ padding-left: 0; /* @noflip */ padding-right: 12px; } [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"] { /* @noflip */ padding-left: 12px; /* @noflip */ padding-right: 0; } .mdc-top-app-bar--prominent .mdc-top-app-bar__title { padding-bottom: 6px; } .mdc-top-app-bar--fixed-adjust { padding-top: 56px; } } /*# sourceMappingURL=mdc.top-app-bar.css.map*/