UNPKG

2.44 kBSCSSView Raw
1//
2// Copyright 2017 Google Inc.
3//
4// Permission is hereby granted, free of charge, to any person obtaining a copy
5// of this software and associated documentation files (the "Software"), to deal
6// in the Software without restriction, including without limitation the rights
7// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8// copies of the Software, and to permit persons to whom the Software is
9// furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20// THE SOFTWARE.
21//
22
23@import "@material/animation/functions";
24@import "@material/theme/mixins";
25@import "@material/rtl/mixins";
26
27$mdc-tab-bar-scroller-indicator-width: 48px;
28
29// postcss-bem-linter: define tab-bar-scroller
30
31.mdc-tab-bar-scroller {
32 display: flex;
33 align-items: center;
34 box-sizing: border-box;
35 width: 100%;
36 background-color: inherit;
37 overflow: hidden;
38
39 &__scroll-frame {
40 display: flex;
41 position: relative;
42 flex: 1;
43 justify-content: flex-start;
44 overflow: hidden;
45
46 &__tabs {
47 transition: mdc-animation-enter(transform, 240ms);
48 will-change: transform;
49 }
50 }
51
52 &__indicator {
53 @include mdc-theme-prop(color, text-secondary-on-background);
54
55 &:hover {
56 @include mdc-theme-prop(color, text-primary-on-background);
57 }
58
59 display: flex;
60 align-items: center;
61 justify-content: center;
62 width: $mdc-tab-bar-scroller-indicator-width;
63 cursor: pointer;
64 visibility: hidden;
65
66 &__inner {
67 color: inherit;
68 text-decoration: inherit;
69 cursor: inherit;
70
71 &:focus {
72 outline-color: inherit;
73 }
74
75 @include mdc-rtl(".mdc-tab-bar-scroller") {
76 transform: rotate(180deg);
77 }
78 }
79
80 &__inner:hover {
81 color: inherit;
82 }
83 }
84
85 &__indicator--enabled {
86 visibility: visible;
87 }
88}
89
90// postcss-bem-linter: end