UNPKG

@material/tabs

Version:
356 lines (346 loc) 10.3 kB
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/material-components/material-components-web/blob/master/LICENSE */ @-webkit-keyframes mdc-ripple-fg-radius-in { from { -webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -webkit-transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1); transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1); } to { -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)); } } @keyframes mdc-ripple-fg-radius-in { from { -webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -webkit-transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1); transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1); } to { -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)); } } @-webkit-keyframes mdc-ripple-fg-opacity-in { from { -webkit-animation-timing-function: linear; animation-timing-function: linear; opacity: 0; } to { opacity: var(--mdc-ripple-fg-opacity, 0); } } @keyframes mdc-ripple-fg-opacity-in { from { -webkit-animation-timing-function: linear; animation-timing-function: linear; opacity: 0; } to { opacity: var(--mdc-ripple-fg-opacity, 0); } } @-webkit-keyframes mdc-ripple-fg-opacity-out { from { -webkit-animation-timing-function: linear; animation-timing-function: linear; opacity: var(--mdc-ripple-fg-opacity, 0); } to { opacity: 0; } } @keyframes mdc-ripple-fg-opacity-out { from { -webkit-animation-timing-function: linear; animation-timing-function: linear; opacity: var(--mdc-ripple-fg-opacity, 0); } to { opacity: 0; } } .mdc-ripple-surface--test-edge-var-bug { --mdc-ripple-surface-test-edge-var: 1px solid #000; visibility: hidden; } .mdc-ripple-surface--test-edge-var-bug::before { border: var(--mdc-ripple-surface-test-edge-var); } .mdc-tab { font-family: Roboto, sans-serif; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; font-size: 0.875rem; line-height: 2.25rem; font-weight: 500; letter-spacing: 0.0892857143em; text-decoration: none; text-transform: uppercase; color: rgba(0, 0, 0, 0.54); /* @alternate */ color: var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54)); --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: rgba(0, 0, 0, 0); display: table-cell; position: relative; box-sizing: border-box; min-width: 160px; min-height: 48px; padding: 0 24px; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; overflow: hidden; vertical-align: middle; } .mdc-tab .mdc-tab__icon { color: rgba(0, 0, 0, 0.54); /* @alternate */ color: var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54)); } .mdc-tab::before, .mdc-tab::after { position: absolute; border-radius: 50%; opacity: 0; pointer-events: none; content: ""; } .mdc-tab::before { transition: opacity 15ms linear, background-color 15ms linear; z-index: 1; } .mdc-tab.mdc-ripple-upgraded::before { -webkit-transform: scale(var(--mdc-ripple-fg-scale, 1)); transform: scale(var(--mdc-ripple-fg-scale, 1)); } .mdc-tab.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-tab.mdc-ripple-upgraded--unbounded::after { top: var(--mdc-ripple-top, 0); /* @noflip */ left: var(--mdc-ripple-left, 0); } .mdc-tab.mdc-ripple-upgraded--foreground-activation::after { -webkit-animation: mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards; animation: mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards; } .mdc-tab.mdc-ripple-upgraded--foreground-deactivation::after { -webkit-animation: mdc-ripple-fg-opacity-out 150ms; animation: mdc-ripple-fg-opacity-out 150ms; -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-tab::before, .mdc-tab::after { background-color: #000; } .mdc-tab:hover::before { opacity: 0.04; } .mdc-tab:not(.mdc-ripple-upgraded):focus::before, .mdc-tab.mdc-ripple-upgraded--background-focused::before { transition-duration: 75ms; opacity: 0.12; } .mdc-tab:not(.mdc-ripple-upgraded)::after { transition: opacity 150ms linear; } .mdc-tab:not(.mdc-ripple-upgraded):active::after { transition-duration: 75ms; opacity: 0.12; } .mdc-tab.mdc-ripple-upgraded { --mdc-ripple-fg-opacity: 0.12; } .mdc-tab::before, .mdc-tab::after { top: calc(50% - 100%); /* @noflip */ left: calc(50% - 100%); width: 200%; height: 200%; } .mdc-tab.mdc-ripple-upgraded::after { width: var(--mdc-ripple-fg-size, 100%); height: var(--mdc-ripple-fg-size, 100%); } .mdc-tab:hover { color: rgba(0, 0, 0, 0.87); /* @alternate */ color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87)); } .mdc-tab:hover .mdc-tab__icon { color: rgba(0, 0, 0, 0.87); /* @alternate */ color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87)); } .mdc-tab:focus { outline: none; } @media screen and (max-width: 600px) { .mdc-tab { min-width: 72px; padding: 0 12px; } } .mdc-tab__icon { display: block; margin: 0 auto; width: 24px; height: 24px; } .mdc-tab-bar--icons-with-text .mdc-tab__icon { margin-top: 4px; } .mdc-tab__icon-text { display: block; margin: 0 auto; } .mdc-tab__icon + .mdc-tab__icon-text { padding-top: 6px; } .mdc-tab--active { color: rgba(0, 0, 0, 0.87); /* @alternate */ color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87)); } .mdc-tab--active .mdc-tab__icon { color: rgba(0, 0, 0, 0.87); /* @alternate */ color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87)); } .mdc-tab--active::before { bottom: 0; } .mdc-tab__indicator { background-color: rgba(0, 0, 0, 0.87); /* @alternate */ background-color: var(--mdc-theme-text-primary-on-light, rgba(0, 0, 0, 0.87)); position: absolute; bottom: 0; height: 2px; visibility: hidden; left: 2px; width: calc(100% - 4px); } .mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab--active .mdc-tab__indicator, .mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab:hover .mdc-tab__indicator, .mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab:active .mdc-tab__indicator { visibility: visible; } .mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab:not(.mdc-tab--active):hover .mdc-tab__indicator { opacity: 0.38; } .mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab--active, .mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab:not(.mdc-tab--active):active .mdc-tab__indicator { opacity: 0.87; } .mdc-tab-bar__indicator, .mdc-tab__indicator { background-color: rgba(0, 0, 0, 0.87); /* @alternate */ background-color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87)); } .mdc-tab-bar { display: table; position: relative; height: 48px; margin: 0 auto; text-transform: uppercase; } .mdc-tab-bar__indicator { background-color: rgba(0, 0, 0, 0.87); /* @alternate */ background-color: var(--mdc-theme-text-primary-on-light, rgba(0, 0, 0, 0.87)); position: absolute; bottom: 0; height: 2px; visibility: hidden; left: 0; width: 100%; -webkit-transform-origin: left top; transform-origin: left top; transition: -webkit-transform 240ms 0ms cubic-bezier(0, 0, 0.2, 1); transition: transform 240ms 0ms cubic-bezier(0, 0, 0.2, 1); transition: transform 240ms 0ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 240ms 0ms cubic-bezier(0, 0, 0.2, 1); will-change: transform; } .mdc-tab-bar--icons-with-text { height: 72px; } .mdc-tab-bar-scroller { display: flex; align-items: center; box-sizing: border-box; width: 100%; background-color: inherit; overflow: hidden; } .mdc-tab-bar-scroller__scroll-frame { display: flex; position: relative; flex: 1; justify-content: flex-start; overflow: hidden; } .mdc-tab-bar-scroller__scroll-frame__tabs { transition: -webkit-transform 240ms 0ms cubic-bezier(0, 0, 0.2, 1); transition: transform 240ms 0ms cubic-bezier(0, 0, 0.2, 1); transition: transform 240ms 0ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 240ms 0ms cubic-bezier(0, 0, 0.2, 1); will-change: transform; } .mdc-tab-bar-scroller__indicator { color: rgba(0, 0, 0, 0.54); /* @alternate */ color: var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54)); display: flex; align-items: center; justify-content: center; width: 48px; cursor: pointer; visibility: hidden; } .mdc-tab-bar-scroller__indicator:hover { color: rgba(0, 0, 0, 0.87); /* @alternate */ color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87)); } .mdc-tab-bar-scroller__indicator__inner { color: inherit; text-decoration: inherit; cursor: inherit; } .mdc-tab-bar-scroller__indicator__inner:focus { outline-color: inherit; } .mdc-tab-bar-scroller[dir=rtl] .mdc-tab-bar-scroller__indicator__inner, [dir=rtl] .mdc-tab-bar-scroller .mdc-tab-bar-scroller__indicator__inner { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .mdc-tab-bar-scroller__indicator__inner:hover { color: inherit; } .mdc-tab-bar-scroller__indicator--enabled { visibility: visible; } /*# sourceMappingURL=mdc.tabs.css.map*/