material_components_web-sass 0.24.0 → 0.25.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/lib/material_components_web/sass/version.rb +1 -1
- data/vendor/assets/javascripts/material-components-web.js +138 -143
- data/vendor/assets/stylesheets/@material/button/_mixins.scss +16 -5
- data/vendor/assets/stylesheets/@material/button/_variables.scss +2 -0
- data/vendor/assets/stylesheets/@material/dialog/mdc-dialog.scss +1 -1
- data/vendor/assets/stylesheets/@material/elevation/_mixins.scss +27 -8
- data/vendor/assets/stylesheets/@material/elevation/_variables.scss +4 -3
- data/vendor/assets/stylesheets/@material/fab/_mixins.scss +3 -4
- data/vendor/assets/stylesheets/@material/linear-progress/_mixins.scss +52 -0
- data/vendor/assets/stylesheets/@material/linear-progress/_variables.scss +15 -0
- data/vendor/assets/stylesheets/@material/linear-progress/mdc-linear-progress.scss +5 -11
- data/vendor/assets/stylesheets/@material/menu/simple/mdc-simple-menu.scss +1 -0
- data/vendor/assets/stylesheets/@material/slider/_keyframes.scss +30 -0
- data/vendor/assets/stylesheets/@material/slider/_mixins.scss +129 -0
- data/vendor/assets/stylesheets/@material/slider/_variables.scss +2 -0
- data/vendor/assets/stylesheets/@material/slider/mdc-slider.scss +21 -121
- data/vendor/assets/stylesheets/@material/snackbar/mdc-snackbar.scss +8 -0
- data/vendor/assets/stylesheets/@material/textfield/_mixins.scss +2 -2
- data/vendor/assets/stylesheets/@material/textfield/_variables.scss +27 -27
- data/vendor/assets/stylesheets/@material/textfield/{mdc-textfield.scss → mdc-text-field.scss} +165 -165
- data/vendor/assets/stylesheets/@material/theme/_functions.scss +19 -5
- data/vendor/assets/stylesheets/@material/theme/_variables.scss +8 -8
- data/vendor/assets/stylesheets/_material-components-web.scss +1 -1
- metadata +7 -3
@@ -40,21 +40,35 @@ $_mdc-theme-tonal-offset: 7%;
|
|
40
40
|
@return max($backLum, $foreLum) / min($backLum, $foreLum);
|
41
41
|
}
|
42
42
|
|
43
|
-
// Determine whether
|
44
|
-
|
45
|
-
@function mdc-theme-light-or-dark($color) {
|
43
|
+
// Determine whether the color is "light" or "dark".
|
44
|
+
@function mdc-theme-tone($color) {
|
46
45
|
$minimumContrast: 3.1;
|
47
46
|
|
48
47
|
$lightContrast: mdc-theme-contrast($color, white);
|
49
48
|
$darkContrast: mdc-theme-contrast($color, rgba(black, .87));
|
50
49
|
|
51
50
|
@if ($lightContrast < $minimumContrast) and ($darkContrast > $lightContrast) {
|
52
|
-
@return "dark";
|
53
|
-
} @else {
|
54
51
|
@return "light";
|
52
|
+
} @else {
|
53
|
+
@return "dark";
|
55
54
|
}
|
56
55
|
}
|
57
56
|
|
57
|
+
// Determine whether to use dark or light text on top of given color to meet accessibility standards for contrast.
|
58
|
+
// Returns "dark" if the given color is light and "light" if the given color is dark.
|
59
|
+
@function mdc-theme-contrast-tone($color) {
|
60
|
+
@return if(mdc-theme-tone($color) == "dark", "light", "dark");
|
61
|
+
}
|
62
|
+
|
63
|
+
// DEPRECATED. Use mdc-theme-contrast-tone instead.
|
64
|
+
@function mdc-theme-light-or-dark($color) {
|
65
|
+
// stylelint-disable indentation
|
66
|
+
@warn "The 'mdc-theme-light-or-dark' mixin is DEPRECATED and will be REMOVED in a future version. " +
|
67
|
+
"Please use 'mdc-theme-contrast-tone' or 'mdc-theme-tone' (as applicable) instead.";
|
68
|
+
@return mdc-theme-contrast-tone($color);
|
69
|
+
// stylelint-enable indentation
|
70
|
+
}
|
71
|
+
|
58
72
|
// lighten() and darken() require values to be between 0% and 100%.
|
59
73
|
@function mdc-theme-clamp-percentage_($percentage) {
|
60
74
|
@return max(0%, min(100%, $percentage));
|
@@ -39,15 +39,15 @@ $mdc-theme-background: #fff !default; // White
|
|
39
39
|
// Which set of text colors to use for each main theme color (light or dark).
|
40
40
|
//
|
41
41
|
|
42
|
-
$mdc-theme-primary-tone: mdc-theme-
|
43
|
-
$mdc-theme-primary-light-tone: mdc-theme-
|
44
|
-
$mdc-theme-primary-dark-tone: mdc-theme-
|
42
|
+
$mdc-theme-primary-tone: mdc-theme-contrast-tone($mdc-theme-primary) !default;
|
43
|
+
$mdc-theme-primary-light-tone: mdc-theme-contrast-tone($mdc-theme-primary-light) !default;
|
44
|
+
$mdc-theme-primary-dark-tone: mdc-theme-contrast-tone($mdc-theme-primary-dark) !default;
|
45
45
|
|
46
|
-
$mdc-theme-secondary-tone: mdc-theme-
|
47
|
-
$mdc-theme-secondary-light-tone: mdc-theme-
|
48
|
-
$mdc-theme-secondary-dark-tone: mdc-theme-
|
46
|
+
$mdc-theme-secondary-tone: mdc-theme-contrast-tone($mdc-theme-secondary) !default;
|
47
|
+
$mdc-theme-secondary-light-tone: mdc-theme-contrast-tone($mdc-theme-secondary-light) !default;
|
48
|
+
$mdc-theme-secondary-dark-tone: mdc-theme-contrast-tone($mdc-theme-secondary-dark) !default;
|
49
49
|
|
50
|
-
$mdc-theme-background-tone: mdc-theme-
|
50
|
+
$mdc-theme-background-tone: mdc-theme-contrast-tone($mdc-theme-background) !default;
|
51
51
|
|
52
52
|
//
|
53
53
|
// Text colors according to light vs dark and text type.
|
@@ -68,7 +68,7 @@ $mdc-theme-text-colors: (
|
|
68
68
|
disabled: rgba(white, .5),
|
69
69
|
icon: rgba(white, .5)
|
70
70
|
)
|
71
|
-
);
|
71
|
+
) !default;
|
72
72
|
|
73
73
|
//
|
74
74
|
// Primary text colors for each of the theme colors.
|
@@ -35,7 +35,7 @@
|
|
35
35
|
@import "@material/snackbar/mdc-snackbar";
|
36
36
|
@import "@material/switch/mdc-switch";
|
37
37
|
@import "@material/tabs/mdc-tabs";
|
38
|
-
@import "@material/textfield/mdc-
|
38
|
+
@import "@material/textfield/mdc-text-field";
|
39
39
|
@import "@material/theme/mdc-theme";
|
40
40
|
@import "@material/toolbar/mdc-toolbar";
|
41
41
|
@import "@material/typography/mdc-typography";
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: material_components_web-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Tarasov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autoprefixer-rails
|
@@ -157,6 +157,8 @@ files:
|
|
157
157
|
- vendor/assets/stylesheets/@material/layout-grid/_variables.scss
|
158
158
|
- vendor/assets/stylesheets/@material/layout-grid/mdc-layout-grid.scss
|
159
159
|
- vendor/assets/stylesheets/@material/linear-progress/_keyframes.scss
|
160
|
+
- vendor/assets/stylesheets/@material/linear-progress/_mixins.scss
|
161
|
+
- vendor/assets/stylesheets/@material/linear-progress/_variables.scss
|
160
162
|
- vendor/assets/stylesheets/@material/linear-progress/mdc-linear-progress.scss
|
161
163
|
- vendor/assets/stylesheets/@material/list/mdc-list.scss
|
162
164
|
- vendor/assets/stylesheets/@material/menu/mdc-menu.scss
|
@@ -171,6 +173,8 @@ files:
|
|
171
173
|
- vendor/assets/stylesheets/@material/ripple/mdc-ripple.scss
|
172
174
|
- vendor/assets/stylesheets/@material/rtl/_mixins.scss
|
173
175
|
- vendor/assets/stylesheets/@material/select/mdc-select.scss
|
176
|
+
- vendor/assets/stylesheets/@material/slider/_keyframes.scss
|
177
|
+
- vendor/assets/stylesheets/@material/slider/_mixins.scss
|
174
178
|
- vendor/assets/stylesheets/@material/slider/_variables.scss
|
175
179
|
- vendor/assets/stylesheets/@material/slider/mdc-slider.scss
|
176
180
|
- vendor/assets/stylesheets/@material/snackbar/_variables.scss
|
@@ -185,7 +189,7 @@ files:
|
|
185
189
|
- vendor/assets/stylesheets/@material/tabs/tab/mdc-tab.scss
|
186
190
|
- vendor/assets/stylesheets/@material/textfield/_mixins.scss
|
187
191
|
- vendor/assets/stylesheets/@material/textfield/_variables.scss
|
188
|
-
- vendor/assets/stylesheets/@material/textfield/mdc-
|
192
|
+
- vendor/assets/stylesheets/@material/textfield/mdc-text-field.scss
|
189
193
|
- vendor/assets/stylesheets/@material/theme/_color-palette.scss
|
190
194
|
- vendor/assets/stylesheets/@material/theme/_constants.scss
|
191
195
|
- vendor/assets/stylesheets/@material/theme/_functions.scss
|