1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | @import "@material/elevation/mixins";
|
24 | @import "@material/ripple/mixins";
|
25 | @import "@material/rtl/mixins";
|
26 | @import "@material/theme/mixins";
|
27 | @import "@material/typography/mixins";
|
28 | @import "./mixins";
|
29 | @import "./variables";
|
30 |
|
31 |
|
32 | .mdc-toolbar {
|
33 | @include mdc-toolbar-fill-color-accessible(primary);
|
34 |
|
35 | display: flex;
|
36 | position: relative;
|
37 | flex-direction: column;
|
38 | justify-content: space-between;
|
39 | box-sizing: border-box;
|
40 | width: 100%;
|
41 |
|
42 | &__row {
|
43 | display: flex;
|
44 | position: relative;
|
45 | align-items: center;
|
46 | box-sizing: border-box;
|
47 | width: 100%;
|
48 | height: auto;
|
49 | min-height: $mdc-toolbar-row-height;
|
50 |
|
51 |
|
52 | @media (max-width: $mdc-toolbar-mobile-landscape-width-breakpoint) and (orientation: landscape) {
|
53 | min-height: $mdc-toolbar-mobile-landscape-row-height;
|
54 | }
|
55 |
|
56 |
|
57 | @media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
58 | min-height: $mdc-toolbar-mobile-row-height;
|
59 | }
|
60 | }
|
61 |
|
62 | &__section {
|
63 | display: inline-flex;
|
64 | flex: 1;
|
65 | align-items: start;
|
66 | justify-content: center;
|
67 | box-sizing: border-box;
|
68 | min-width: 0;
|
69 | height: 100%;
|
70 | padding: $mdc-toolbar-element-section-padding;
|
71 | z-index: 1;
|
72 |
|
73 | @media (max-width: $mdc-toolbar-mobile-landscape-width-breakpoint) and (orientation: landscape) {
|
74 | padding: 0;
|
75 | }
|
76 |
|
77 | @media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
78 | padding: $mdc-toolbar-element-mobile-section-padding 0;
|
79 | }
|
80 |
|
81 | &--align-start {
|
82 | @include mdc-rtl-reflexive-box(padding, "left", $mdc-toolbar-section-horizontal-padding);
|
83 |
|
84 | justify-content: flex-start;
|
85 | order: -1;
|
86 |
|
87 | @media (max-width: $mdc-toolbar-mobile-landscape-width-breakpoint) and (orientation: landscape) {
|
88 | @include mdc-rtl-reflexive-box(padding, "left", $mdc-toolbar-mobile-section-horizontal-padding);
|
89 | }
|
90 |
|
91 | @media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
92 | @include mdc-rtl-reflexive-box(padding, "left", $mdc-toolbar-mobile-section-horizontal-padding);
|
93 | }
|
94 | }
|
95 |
|
96 | &--align-end {
|
97 | @include mdc-rtl-reflexive-box(padding, "right", $mdc-toolbar-section-horizontal-padding);
|
98 |
|
99 | justify-content: flex-end;
|
100 | order: 1;
|
101 |
|
102 | @media (max-width: $mdc-toolbar-mobile-landscape-width-breakpoint) and (orientation: landscape) {
|
103 | @include mdc-rtl-reflexive-box(padding, "right", $mdc-toolbar-mobile-section-horizontal-padding);
|
104 | }
|
105 |
|
106 | @media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
107 | @include mdc-rtl-reflexive-box(padding, "right", $mdc-toolbar-mobile-section-horizontal-padding);
|
108 | }
|
109 | }
|
110 | }
|
111 |
|
112 | &__title {
|
113 | @include mdc-typography(headline6);
|
114 | @include mdc-typography-overflow-ellipsis;
|
115 | @include mdc-rtl-reflexive-box(margin, left, $mdc-toolbar-element-horizontal-padding-desktop);
|
116 |
|
117 | align-self: center;
|
118 | padding: 12px 0;
|
119 | line-height: 1.5rem;
|
120 | z-index: 1;
|
121 | }
|
122 |
|
123 | &__icon,
|
124 | &__menu-icon {
|
125 | @include mdc-toolbar-icon_;
|
126 | }
|
127 | }
|
128 |
|
129 | .mdc-toolbar__menu-icon + .mdc-toolbar__title {
|
130 | @include mdc-rtl-reflexive-box(margin, left, $mdc-toolbar-title-margin-to-menu-icon-desktop);
|
131 | }
|
132 |
|
133 | @media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
134 | .mdc-toolbar__title {
|
135 | @include mdc-rtl-reflexive-box(margin, left, $mdc-toolbar-element-horizontal-padding-mobile);
|
136 | }
|
137 | }
|
138 |
|
139 | .mdc-toolbar--fixed {
|
140 | @include mdc-elevation(4);
|
141 |
|
142 | position: fixed;
|
143 | top: 0;
|
144 | left: 0;
|
145 | z-index: 4;
|
146 | }
|
147 |
|
148 | .mdc-toolbar--flexible {
|
149 |
|
150 |
|
151 | --mdc-toolbar-ratio-to-extend-flexible: #{$mdc-toolbar-ratio-to-extend-flexible};
|
152 |
|
153 | .mdc-toolbar__row:first-child {
|
154 | height: $mdc-toolbar-row-height * $mdc-toolbar-ratio-to-extend-flexible;
|
155 | height:
|
156 | calc(
|
157 | #{$mdc-toolbar-row-height} *
|
158 | var(--mdc-toolbar-ratio-to-extend-flexible, #{$mdc-toolbar-ratio-to-extend-flexible})
|
159 | );
|
160 |
|
161 | @media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
162 | height: $mdc-toolbar-mobile-row-height * $mdc-toolbar-ratio-to-extend-flexible;
|
163 | height:
|
164 | calc(
|
165 | #{$mdc-toolbar-mobile-row-height} *
|
166 | var(--mdc-toolbar-ratio-to-extend-flexible, #{$mdc-toolbar-ratio-to-extend-flexible})
|
167 | );
|
168 | }
|
169 |
|
170 | &::after {
|
171 |
|
172 | position: absolute;
|
173 | content: "";
|
174 | }
|
175 | }
|
176 |
|
177 |
|
178 |
|
179 | &-default-behavior {
|
180 | .mdc-toolbar__title {
|
181 | @include mdc-typography(headline6);
|
182 |
|
183 | align-self: flex-end;
|
184 | line-height: 1.5rem;
|
185 | }
|
186 |
|
187 | .mdc-toolbar__row:first-child::after {
|
188 | top: 0;
|
189 | left: 0;
|
190 | width: 100%;
|
191 | height: 100%;
|
192 | transition: opacity .2s ease;
|
193 | opacity: 1;
|
194 | }
|
195 |
|
196 | &.mdc-toolbar--flexible-space-minimized {
|
197 | .mdc-toolbar__row:first-child::after {
|
198 | opacity: 0;
|
199 | }
|
200 |
|
201 | .mdc-toolbar__title {
|
202 | font-weight: #{map-get($mdc-typography-font-weight-values, medium)};
|
203 | }
|
204 | }
|
205 | }
|
206 | }
|
207 |
|
208 | .mdc-toolbar--waterfall {
|
209 | &.mdc-toolbar--fixed {
|
210 | @include mdc-elevation(0);
|
211 |
|
212 | transition: mdc-elevation-transition-value();
|
213 | will-change: $mdc-elevation-property;
|
214 |
|
215 | &.mdc-toolbar--flexible-space-minimized {
|
216 | @include mdc-elevation(4);
|
217 | }
|
218 |
|
219 | &.mdc-toolbar--fixed-lastrow-only {
|
220 | &.mdc-toolbar--flexible-space-minimized {
|
221 | @include mdc-elevation(0);
|
222 | }
|
223 |
|
224 | &.mdc-toolbar--fixed-at-last-row {
|
225 | @include mdc-elevation(4);
|
226 | }
|
227 | }
|
228 | }
|
229 | }
|
230 |
|
231 |
|
232 |
|
233 | .mdc-toolbar-fixed-adjust {
|
234 | padding-top: $mdc-toolbar-row-height;
|
235 |
|
236 | @media (max-width: $mdc-toolbar-mobile-landscape-width-breakpoint) and (max-height: $mdc-toolbar-mobile-breakpoint) {
|
237 | padding-top: $mdc-toolbar-mobile-landscape-row-height;
|
238 | }
|
239 |
|
240 | @media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
241 | padding-top: $mdc-toolbar-mobile-row-height;
|
242 | }
|
243 | }
|
244 |
|
245 | .mdc-toolbar__section--shrink-to-fit {
|
246 | flex: none;
|
247 | }
|