11@import ' ../core/style/variables' ;
22@import ' ../core/style/noop-animation' ;
3+ @import ' ../core/style/vendor-prefixes' ;
34@import ' ../../cdk/a11y/a11y' ;
45
56$mat-tab-bar-height : 48px !default ;
@@ -51,14 +52,7 @@ $mat-tab-animation-duration: 500ms !default;
5152 }
5253}
5354
54- // Mixin styles for the top section of the view; contains the tab labels.
55- @mixin tab-header {
56- overflow : hidden ;
57- position : relative ;
58- flex-shrink : 0 ;
59- }
60-
61- // Mixin styles for the ink bar that displays near the active tab in the header.
55+ // The ink bar that displays under the active tab label
6256@mixin ink-bar {
6357 $height : 2px ;
6458
@@ -78,3 +72,85 @@ $mat-tab-animation-duration: 500ms !default;
7872 height : 0 ;
7973 }
8074}
75+
76+ // Structural styles for a tab header. Used by both `mat-tab-header` and `mat-tab-nav-bar`.
77+ @mixin paginated-tab-header {
78+ .mat-tab-header {
79+ display : flex ;
80+ overflow : hidden ;
81+ position : relative ;
82+ flex-shrink : 0 ;
83+ }
84+
85+ .mat-tab-header-pagination {
86+ @include user-select (none );
87+ position : relative ;
88+ display : none ;
89+ justify-content : center ;
90+ align-items : center ;
91+ min-width : 32px ;
92+ cursor : pointer ;
93+ z-index : 2 ;
94+ -webkit-tap-highlight-color : transparent ;
95+ touch-action : none ;
96+
97+ .mat-tab-header-pagination-controls-enabled & {
98+ display : flex ;
99+ }
100+ }
101+
102+ // The pagination control that is displayed on the left side of the tab header.
103+ .mat-tab-header-pagination-before , .mat-tab-header-rtl .mat-tab-header-pagination-after {
104+ padding-left : 4px ;
105+ .mat-tab-header-pagination-chevron {
106+ transform : rotate (-135deg );
107+ }
108+ }
109+
110+ // The pagination control that is displayed on the right side of the tab header.
111+ .mat-tab-header-rtl .mat-tab-header-pagination-before , .mat-tab-header-pagination-after {
112+ padding-right : 4px ;
113+ .mat-tab-header-pagination-chevron {
114+ transform : rotate (45deg );
115+ }
116+ }
117+
118+ .mat-tab-header-pagination-chevron {
119+ border-style : solid ;
120+ border-width : 2px 2px 0 0 ;
121+ content : ' ' ;
122+ height : 8px ;
123+ width : 8px ;
124+ }
125+
126+ .mat-tab-header-pagination-disabled {
127+ box-shadow : none ;
128+ cursor : default ;
129+ }
130+
131+ .mat-tab-list {
132+ flex-grow : 1 ;
133+ position : relative ;
134+ transition : transform 500ms cubic-bezier (0.35 , 0 , 0.25 , 1 );
135+ }
136+ }
137+
138+ // Structural styles for the element that wraps the paginated header items.
139+ @mixin paginated-tab-header-item-wrapper {
140+ display : flex ;
141+
142+ [mat-align-tabs = ' center' ] & {
143+ justify-content : center ;
144+ }
145+
146+ [mat-align-tabs = ' end' ] & {
147+ justify-content : flex-end ;
148+ }
149+ }
150+
151+ @mixin paginated-tab-header-container {
152+ display : flex ;
153+ flex-grow : 1 ;
154+ overflow : hidden ;
155+ z-index : 1 ;
156+ }
0 commit comments