material_components_web-sass 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +0 -1
- data/lib/material_components_web/sass/version.rb +1 -1
- data/vendor/assets/javascripts/material-components-web.js +24 -5
- data/vendor/assets/stylesheets/@material/button/_mixins.scss +166 -14
- data/vendor/assets/stylesheets/@material/{animation/mdc-animation.scss → button/_variables.scss} +2 -19
- data/vendor/assets/stylesheets/@material/button/mdc-button.scss +22 -160
- data/vendor/assets/stylesheets/@material/card/mdc-card.scss +12 -13
- data/vendor/assets/stylesheets/@material/checkbox/_keyframes.scss +3 -3
- data/vendor/assets/stylesheets/@material/checkbox/mdc-checkbox.scss +9 -10
- data/vendor/assets/stylesheets/@material/dialog/mdc-dialog.scss +12 -17
- data/vendor/assets/stylesheets/@material/drawer/_mixins.scss +5 -5
- data/vendor/assets/stylesheets/@material/fab/_mixins.scss +42 -6
- data/vendor/assets/stylesheets/@material/{animation/_mixins.scss → fab/_variables.scss} +1 -19
- data/vendor/assets/stylesheets/@material/fab/mdc-fab.scss +6 -8
- data/vendor/assets/stylesheets/@material/grid-list/mdc-grid-list.scss +9 -9
- data/vendor/assets/stylesheets/@material/icon-toggle/mdc-icon-toggle.scss +4 -4
- data/vendor/assets/stylesheets/@material/layout-grid/_mixins.scss +8 -15
- data/vendor/assets/stylesheets/@material/linear-progress/mdc-linear-progress.scss +5 -5
- data/vendor/assets/stylesheets/@material/radio/mdc-radio.scss +6 -6
- data/vendor/assets/stylesheets/@material/ripple/_keyframes.scss +3 -3
- data/vendor/assets/stylesheets/@material/ripple/_mixins.scss +16 -1
- data/vendor/assets/stylesheets/@material/ripple/mdc-ripple.scss +0 -16
- data/vendor/assets/stylesheets/@material/rtl/_mixins.scss +1 -3
- data/vendor/assets/stylesheets/@material/select/mdc-select.scss +18 -25
- data/vendor/assets/stylesheets/@material/slider/mdc-slider.scss +1 -1
- data/vendor/assets/stylesheets/@material/snackbar/mdc-snackbar.scss +18 -14
- data/vendor/assets/stylesheets/@material/switch/mdc-switch.scss +8 -9
- data/vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss +8 -9
- data/vendor/assets/stylesheets/@material/theme/_functions.scss +3 -9
- data/vendor/assets/stylesheets/@material/theme/_mixins.scss +5 -15
- data/vendor/assets/stylesheets/@material/toolbar/_mixins.scss +6 -6
- data/vendor/assets/stylesheets/@material/toolbar/mdc-toolbar.scss +7 -7
- data/vendor/assets/stylesheets/_material-components-web.scss +0 -1
- metadata +4 -4
@@ -135,12 +135,12 @@ $mdc-grid-list-tile-secondary-icon-size: 24px;
|
|
135
135
|
width: var(--mdc-grid-list-tile-width, $mdc-grid-list-tile-width);
|
136
136
|
|
137
137
|
&__primary {
|
138
|
-
position: relative;
|
139
|
-
height: 0;
|
140
|
-
|
141
138
|
@include mdc-theme-prop(background-color, background);
|
142
139
|
@include mdc-theme-prop(color, text-primary-on-background);
|
143
140
|
|
141
|
+
position: relative;
|
142
|
+
height: 0;
|
143
|
+
|
144
144
|
&-content {
|
145
145
|
position: absolute;
|
146
146
|
top: 0;
|
@@ -156,25 +156,25 @@ $mdc-grid-list-tile-secondary-icon-size: 24px;
|
|
156
156
|
}
|
157
157
|
|
158
158
|
&__secondary {
|
159
|
+
@include mdc-theme-prop(background-color, primary);
|
160
|
+
@include mdc-theme-prop(color, text-primary-on-primary);
|
161
|
+
|
159
162
|
position: absolute;
|
160
|
-
box-sizing: border-box;
|
161
163
|
bottom: 0;
|
164
|
+
box-sizing: border-box;
|
162
165
|
height: $mdc-grid-list-oneline-cap-secondary-height;
|
163
166
|
padding: $mdc-grid-list-tile-secondary-padding;
|
164
|
-
|
165
|
-
@include mdc-theme-prop(background-color, primary);
|
166
|
-
@include mdc-theme-prop(color, text-primary-on-primary);
|
167
167
|
}
|
168
168
|
|
169
169
|
&__title {
|
170
|
+
@include mdc-typography-overflow-ellipsis;
|
171
|
+
|
170
172
|
display: block;
|
171
173
|
margin: 0;
|
172
174
|
padding: 0;
|
173
175
|
font-size: 1rem;
|
174
176
|
font-weight: #{map-get($mdc-typography-font-weight-values, medium)};
|
175
177
|
line-height: 1rem;
|
176
|
-
|
177
|
-
@include mdc-typography-overflow-ellipsis;
|
178
178
|
}
|
179
179
|
|
180
180
|
&__support-text {
|
@@ -46,13 +46,11 @@
|
|
46
46
|
@include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .16));
|
47
47
|
}
|
48
48
|
|
49
|
-
// For some reason, GPU layer promotion makes ripples look terrible on Chrome
|
50
|
-
will-change: initial;
|
51
49
|
display: flex;
|
52
50
|
position: relative;
|
53
|
-
box-sizing: border-box;
|
54
51
|
align-items: center;
|
55
52
|
justify-content: center;
|
53
|
+
box-sizing: border-box;
|
56
54
|
width: 48px;
|
57
55
|
height: 48px;
|
58
56
|
padding: 12px;
|
@@ -60,13 +58,15 @@
|
|
60
58
|
font-size: 1.5rem;
|
61
59
|
cursor: pointer;
|
62
60
|
user-select: none;
|
61
|
+
// For some reason, GPU layer promotion makes ripples look terrible on Chrome
|
62
|
+
will-change: initial;
|
63
63
|
|
64
64
|
&::after {
|
65
65
|
position: absolute;
|
66
66
|
border-radius: 50%;
|
67
|
-
content: "";
|
68
67
|
opacity: 0;
|
69
68
|
pointer-events: none;
|
69
|
+
content: "";
|
70
70
|
}
|
71
71
|
|
72
72
|
@include mdc-theme-dark {
|
@@ -48,23 +48,17 @@
|
|
48
48
|
@media (max-width: $max) {
|
49
49
|
@content;
|
50
50
|
}
|
51
|
-
}
|
52
|
-
|
53
|
-
@else if $min != null and $max != null {
|
51
|
+
} @else if $min != null and $max != null {
|
54
52
|
// Tablet
|
55
53
|
@media (min-width: $min) and (max-width: $max) {
|
56
54
|
@content;
|
57
55
|
}
|
58
|
-
}
|
59
|
-
|
60
|
-
@else if $min != null and $max == null {
|
56
|
+
} @else if $min != null and $max == null {
|
61
57
|
// Desktop
|
62
58
|
@media (min-width: $min) {
|
63
59
|
@content;
|
64
60
|
}
|
65
|
-
}
|
66
|
-
|
67
|
-
@else {
|
61
|
+
} @else {
|
68
62
|
// Fallback - no breakpoints defined
|
69
63
|
@content;
|
70
64
|
}
|
@@ -98,13 +92,12 @@
|
|
98
92
|
|
99
93
|
box-sizing: border-box;
|
100
94
|
margin: 0 auto;
|
95
|
+
padding: $margin;
|
96
|
+
padding: var(--mdc-layout-grid-margin-#{$size}, #{$margin});
|
101
97
|
|
102
98
|
@if $max-width {
|
103
99
|
max-width: $max-width;
|
104
100
|
}
|
105
|
-
|
106
|
-
padding: $margin;
|
107
|
-
padding: var(--mdc-layout-grid-margin-#{$size}, #{$margin});
|
108
101
|
}
|
109
102
|
|
110
103
|
@mixin mdc-layout-grid-inner($size, $margin, $gutter) {
|
@@ -120,9 +113,9 @@
|
|
120
113
|
|
121
114
|
@supports (display: grid) {
|
122
115
|
display: grid;
|
116
|
+
margin: 0;
|
123
117
|
grid-gap: $gutter;
|
124
118
|
grid-gap: var(--mdc-layout-grid-gutter-#{$size}, $gutter);
|
125
|
-
margin: 0;
|
126
119
|
grid-template-columns: repeat(map-get($mdc-layout-grid-columns, $size), minmax(0, 1fr));
|
127
120
|
}
|
128
121
|
}
|
@@ -132,6 +125,8 @@
|
|
132
125
|
@error "Invalid style specified! Choose one of #{map-keys($mdc-layout-grid-columns)}";
|
133
126
|
}
|
134
127
|
|
128
|
+
@include mdc-layout-grid-cell-span_($size, $default-span, $gutter);
|
129
|
+
|
135
130
|
box-sizing: border-box;
|
136
131
|
margin: $gutter / 2;
|
137
132
|
margin: calc(var(--mdc-layout-grid-gutter-#{$size}, #{$gutter}) / 2);
|
@@ -139,8 +134,6 @@
|
|
139
134
|
@supports (display: grid) {
|
140
135
|
margin: 0;
|
141
136
|
}
|
142
|
-
|
143
|
-
@include mdc-layout-grid-cell-span_($size, $default-span, $gutter);
|
144
137
|
}
|
145
138
|
|
146
139
|
@mixin mdc-layout-grid-cell-order($order) {
|
@@ -25,10 +25,10 @@
|
|
25
25
|
overflow: hidden;
|
26
26
|
|
27
27
|
&__bar {
|
28
|
-
animation: none;
|
29
28
|
position: absolute;
|
30
29
|
width: 100%;
|
31
30
|
height: 100%;
|
31
|
+
animation: none;
|
32
32
|
transform-origin: top left;
|
33
33
|
transition: mdc-animation-exit-temporary(transform, 250ms);
|
34
34
|
}
|
@@ -36,11 +36,11 @@
|
|
36
36
|
&__bar-inner {
|
37
37
|
@include mdc-theme-prop(background-color, primary);
|
38
38
|
|
39
|
-
animation: none;
|
40
39
|
display: inline-block;
|
41
40
|
position: absolute;
|
42
41
|
width: 100%;
|
43
42
|
height: 100%;
|
43
|
+
animation: none;
|
44
44
|
}
|
45
45
|
|
46
46
|
&--accent .mdc-linear-progress__bar-inner {
|
@@ -51,12 +51,12 @@
|
|
51
51
|
position: absolute;
|
52
52
|
width: 100%;
|
53
53
|
height: 100%;
|
54
|
+
animation: buffering 250ms infinite linear;
|
54
55
|
// SVG is optimized for data URI (https://codepen.io/tigt/post/optimizing-svgs-in-data-uris)
|
55
56
|
// stylelint-disable-next-line function-url-quotes
|
56
57
|
background-image: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E");
|
57
58
|
background-repeat: repeat-x;
|
58
59
|
background-size: 10px 4px;
|
59
|
-
animation: buffering 250ms infinite linear;
|
60
60
|
}
|
61
61
|
|
62
62
|
&__buffer {
|
@@ -78,8 +78,8 @@
|
|
78
78
|
}
|
79
79
|
|
80
80
|
.mdc-linear-progress__primary-bar {
|
81
|
-
animation: primary-indeterminate-translate 2s infinite linear;
|
82
81
|
left: -145.166611%;
|
82
|
+
animation: primary-indeterminate-translate 2s infinite linear;
|
83
83
|
|
84
84
|
> .mdc-linear-progress__bar-inner {
|
85
85
|
animation: primary-indeterminate-scale 2s infinite linear;
|
@@ -87,8 +87,8 @@
|
|
87
87
|
}
|
88
88
|
|
89
89
|
.mdc-linear-progress__secondary-bar {
|
90
|
-
animation: secondary-indeterminate-translate 2s infinite linear;
|
91
90
|
left: -54.888891%;
|
91
|
+
animation: secondary-indeterminate-translate 2s infinite linear;
|
92
92
|
visibility: visible;
|
93
93
|
|
94
94
|
> .mdc-linear-progress__bar-inner {
|
@@ -39,8 +39,8 @@ $mdc-radio-transition-duration: 120ms;
|
|
39
39
|
|
40
40
|
display: inline-block;
|
41
41
|
position: relative;
|
42
|
-
box-sizing: border-box;
|
43
42
|
flex: 0 0 auto;
|
43
|
+
box-sizing: border-box;
|
44
44
|
width: $mdc-radio-touch-area;
|
45
45
|
height: $mdc-radio-touch-area;
|
46
46
|
padding: ($mdc-radio-touch-area - $mdc-radio-ui-size) / 2;
|
@@ -68,9 +68,9 @@ $mdc-radio-transition-duration: 120ms;
|
|
68
68
|
display: inline-block;
|
69
69
|
position: absolute;
|
70
70
|
left: ($mdc-radio-touch-area - $mdc-radio-ui-size) / 2;
|
71
|
+
box-sizing: border-box;
|
71
72
|
width: $mdc-radio-ui-pct;
|
72
73
|
height: $mdc-radio-ui-pct;
|
73
|
-
box-sizing: border-box;
|
74
74
|
|
75
75
|
&::before {
|
76
76
|
@include mdc-theme-prop(background-color, primary);
|
@@ -83,9 +83,9 @@ $mdc-radio-transition-duration: 120ms;
|
|
83
83
|
transform: scale(0, 0);
|
84
84
|
transition: mdc-radio-exit(opacity), mdc-radio-exit(transform);
|
85
85
|
border-radius: 50%;
|
86
|
-
content: "";
|
87
86
|
opacity: 0;
|
88
87
|
pointer-events: none;
|
88
|
+
content: "";
|
89
89
|
}
|
90
90
|
}
|
91
91
|
|
@@ -99,13 +99,13 @@ $mdc-radio-transition-duration: 120ms;
|
|
99
99
|
position: absolute;
|
100
100
|
top: 0;
|
101
101
|
left: 0;
|
102
|
+
box-sizing: border-box;
|
102
103
|
width: 100%;
|
103
104
|
height: 100%;
|
104
105
|
transition: mdc-radio-exit(border-color);
|
105
106
|
border-width: 2px;
|
106
107
|
border-style: solid;
|
107
108
|
border-radius: 50%;
|
108
|
-
box-sizing: border-box;
|
109
109
|
}
|
110
110
|
|
111
111
|
&__inner-circle {
|
@@ -118,12 +118,12 @@ $mdc-radio-transition-duration: 120ms;
|
|
118
118
|
position: absolute;
|
119
119
|
top: 0;
|
120
120
|
left: 0;
|
121
|
+
box-sizing: border-box;
|
121
122
|
width: 100%;
|
122
123
|
height: 100%;
|
123
124
|
transform: scale(0, 0);
|
124
125
|
transition: mdc-radio-exit(transform), mdc-radio-exit(background-color);
|
125
126
|
border-radius: 50%;
|
126
|
-
box-sizing: border-box;
|
127
127
|
}
|
128
128
|
|
129
129
|
&__native-control {
|
@@ -134,8 +134,8 @@ $mdc-radio-transition-duration: 120ms;
|
|
134
134
|
height: 100%;
|
135
135
|
margin: 0;
|
136
136
|
padding: 0;
|
137
|
-
cursor: inherit;
|
138
137
|
opacity: 0;
|
138
|
+
cursor: inherit;
|
139
139
|
z-index: 1;
|
140
140
|
}
|
141
141
|
}
|
@@ -20,12 +20,12 @@
|
|
20
20
|
|
21
21
|
@keyframes mdc-ripple-fg-radius-in {
|
22
22
|
from {
|
23
|
+
animation-timing-function: $mdc-animation-standard-curve-timing-function;
|
23
24
|
// NOTE: For these keyframes, we do not need custom property fallbacks because they are only
|
24
25
|
// used in conjunction with `.mdc-ripple-upgraded`. Since MDCRippleFoundation checks to ensure
|
25
26
|
// that custom properties are supported within the browser before adding this class, we can
|
26
27
|
// safely use them without a fallback.
|
27
28
|
transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);
|
28
|
-
animation-timing-function: $mdc-animation-standard-curve-timing-function;
|
29
29
|
}
|
30
30
|
|
31
31
|
to {
|
@@ -35,8 +35,8 @@
|
|
35
35
|
|
36
36
|
@keyframes mdc-ripple-fg-opacity-in {
|
37
37
|
from {
|
38
|
-
opacity: 0;
|
39
38
|
animation-timing-function: linear;
|
39
|
+
opacity: 0;
|
40
40
|
}
|
41
41
|
|
42
42
|
to {
|
@@ -46,8 +46,8 @@
|
|
46
46
|
|
47
47
|
@keyframes mdc-ripple-fg-opacity-out {
|
48
48
|
from {
|
49
|
-
opacity: 1;
|
50
49
|
animation-timing-function: linear;
|
50
|
+
opacity: 1;
|
51
51
|
}
|
52
52
|
|
53
53
|
to {
|
@@ -235,8 +235,23 @@
|
|
235
235
|
}
|
236
236
|
|
237
237
|
&.mdc-ripple-upgraded--foreground-deactivation#{$pseudo} {
|
238
|
+
animation: 83ms mdc-ripple-fg-opacity-out;
|
238
239
|
// Retain transform from mdc-ripple-fg-radius-in activation
|
239
240
|
transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));
|
240
|
-
|
241
|
+
}
|
242
|
+
}
|
243
|
+
|
244
|
+
// Styles used to detect buggy behavior of CSS custom properties in Edge.
|
245
|
+
// See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11495448/
|
246
|
+
// This is included in _mixins.scss rather than mdc-ripple.scss so that it will be
|
247
|
+
// present for other components which rely on ripple as well as mdc-ripple itself.
|
248
|
+
|
249
|
+
.mdc-ripple-surface--test-edge-var-bug {
|
250
|
+
--mdc-ripple-surface-test-edge-var: 1px solid #000;
|
251
|
+
|
252
|
+
visibility: hidden;
|
253
|
+
|
254
|
+
&::before {
|
255
|
+
border: var(--mdc-ripple-surface-test-edge-var);
|
241
256
|
}
|
242
257
|
}
|
@@ -54,20 +54,4 @@
|
|
54
54
|
}
|
55
55
|
}
|
56
56
|
|
57
|
-
// Styles used to detect buggy behavior of CSS custom properties in Edge
|
58
|
-
// See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11495448/
|
59
|
-
|
60
|
-
.mdc-ripple-surface--test-edge-var-bug {
|
61
|
-
// stylelint-disable plugin/selector-bem-pattern
|
62
|
-
// bem linter is disabled because it cannot correctly reconcile mdc prefix for css variables.
|
63
|
-
--mdc-ripple-surface-test-edge-var: 1px solid #000;
|
64
|
-
// stylelint-enable plugin/selector-bem-pattern
|
65
|
-
|
66
|
-
visibility: hidden;
|
67
|
-
|
68
|
-
&::before {
|
69
|
-
border: var(--mdc-ripple-surface-test-edge-var);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
57
|
// postcss-bem-linter: end
|
@@ -30,13 +30,7 @@
|
|
30
30
|
@include mdc-typography(subheading2);
|
31
31
|
@include mdc-theme-prop(color, text-primary-on-light);
|
32
32
|
@include mdc-rtl-reflexive-box(padding, right, $dd-arrow-padding);
|
33
|
-
|
34
|
-
// Resets for <select> element
|
35
|
-
appearance: none;
|
36
|
-
|
37
|
-
&::-ms-expand {
|
38
|
-
display: none;
|
39
|
-
}
|
33
|
+
@include mdc-select-dd-arrow-svg-bg_;
|
40
34
|
|
41
35
|
display: inline-flex;
|
42
36
|
align-items: center;
|
@@ -49,15 +43,17 @@
|
|
49
43
|
border: none;
|
50
44
|
border-bottom: 1px solid rgba(black, .12);
|
51
45
|
border-radius: 0;
|
52
|
-
background: none;
|
53
46
|
background-repeat: no-repeat;
|
54
47
|
background-position: right center;
|
55
|
-
|
56
|
-
@include mdc-select-dd-arrow-svg-bg_;
|
57
|
-
|
58
48
|
font-family: Roboto, sans-serif;
|
59
49
|
font-size: .936rem;
|
60
50
|
cursor: pointer;
|
51
|
+
// Resets for <select> element
|
52
|
+
appearance: none;
|
53
|
+
|
54
|
+
&::-ms-expand {
|
55
|
+
display: none;
|
56
|
+
}
|
61
57
|
|
62
58
|
&:focus {
|
63
59
|
@include mdc-theme-prop(border-bottom-color, primary);
|
@@ -183,32 +179,31 @@
|
|
183
179
|
|
184
180
|
// postcss-bem-linter: define multi-select
|
185
181
|
.mdc-multi-select {
|
186
|
-
|
182
|
+
@include mdc-theme-prop(border-color, text-hint-on-light);
|
183
|
+
|
187
184
|
width: 250px;
|
188
185
|
padding: 0;
|
189
|
-
border: 1px
|
190
|
-
|
191
|
-
|
186
|
+
border-width: 1px;
|
187
|
+
border-style: solid;
|
188
|
+
outline: none;
|
189
|
+
appearance: none;
|
192
190
|
|
193
191
|
@include mdc-theme-dark {
|
194
192
|
@include mdc-theme-prop(border-color, text-hint-on-dark);
|
195
193
|
}
|
196
194
|
|
197
|
-
outline: none;
|
198
|
-
|
199
195
|
// stylelint-disable plugin/selector-bem-pattern
|
200
196
|
.mdc-list-group {
|
197
|
+
@include mdc-theme-prop(color, text-hint-on-light);
|
198
|
+
|
201
199
|
margin: 16px 0 0;
|
202
200
|
padding: 0 0 0 16px;
|
203
|
-
|
204
|
-
@include mdc-theme-prop(color, text-hint-on-light);
|
201
|
+
font-weight: normal;
|
205
202
|
|
206
203
|
@include mdc-theme-dark {
|
207
204
|
@include mdc-theme-prop(color, text-hint-on-dark);
|
208
205
|
}
|
209
206
|
|
210
|
-
font-weight: normal;
|
211
|
-
|
212
207
|
&:last-child {
|
213
208
|
margin-bottom: 16px;
|
214
209
|
}
|
@@ -221,11 +216,11 @@
|
|
221
216
|
|
222
217
|
// stylelint-disable plugin/selector-bem-pattern
|
223
218
|
.mdc-list-item {
|
219
|
+
@include mdc-theme-prop(color, text-primary-on-light);
|
220
|
+
|
224
221
|
margin: 0 0 0 -16px;
|
225
222
|
padding: 0 16px;
|
226
223
|
|
227
|
-
@include mdc-theme-prop(color, text-primary-on-light);
|
228
|
-
|
229
224
|
@include mdc-theme-dark {
|
230
225
|
@include mdc-theme-prop(color, text-primary-on-dark);
|
231
226
|
}
|
@@ -242,8 +237,6 @@
|
|
242
237
|
|
243
238
|
// stylelint-disable plugin/selector-bem-pattern
|
244
239
|
.mdc-list-item:checked {
|
245
|
-
background-color: rgba(black, .12);
|
246
|
-
|
247
240
|
@include mdc-theme-prop(background-color, background);
|
248
241
|
|
249
242
|
@include mdc-theme-dark {
|