material_components_web-sass 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -0
- data/lib/material_components_web/sass/version.rb +1 -1
- data/vendor/assets/javascripts/material-components-web.js +5802 -5618
- data/vendor/assets/stylesheets/@material/button/mdc-button.scss +2 -0
- data/vendor/assets/stylesheets/@material/checkbox/mdc-checkbox.scss +18 -4
- data/vendor/assets/stylesheets/@material/drawer/temporary/mdc-temporary-drawer.scss +3 -0
- data/vendor/assets/stylesheets/@material/elevation/_mixins.scss +3 -3
- data/vendor/assets/stylesheets/@material/layout-grid/_mixins.scss +0 -2
- data/vendor/assets/stylesheets/@material/menu/simple/mdc-simple-menu.scss +1 -0
- data/vendor/assets/stylesheets/@material/select/mdc-select.scss +8 -5
- data/vendor/assets/stylesheets/@material/switch/mdc-switch.scss +1 -5
- data/vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss +1 -1
- data/vendor/assets/stylesheets/@material/toolbar/mdc-toolbar.scss +90 -0
- data/vendor/assets/stylesheets/@material/typography/_variables.scss +3 -3
- data/vendor/assets/stylesheets/_material-components-web.scss +1 -0
- metadata +3 -2
@@ -42,12 +42,14 @@
|
|
42
42
|
text-decoration: none;
|
43
43
|
text-transform: uppercase;
|
44
44
|
vertical-align: middle;
|
45
|
+
user-select: none;
|
45
46
|
box-sizing: border-box;
|
46
47
|
-webkit-appearance: none;
|
47
48
|
-webkit-tap-highlight-color: rgba(black, .18);
|
48
49
|
|
49
50
|
@include mdc-theme-dark {
|
50
51
|
@include mdc-theme-prop(color, text-primary-on-dark);
|
52
|
+
|
51
53
|
-webkit-tap-highlight-color: rgba(white, .18);
|
52
54
|
}
|
53
55
|
|
@@ -1,12 +1,12 @@
|
|
1
|
-
//
|
1
|
+
//
|
2
2
|
// Copyright 2016 Google Inc. All Rights Reserved.
|
3
|
-
//
|
3
|
+
//
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
// you may not use this file except in compliance with the License.
|
6
6
|
// You may obtain a copy of the License at
|
7
|
-
//
|
7
|
+
//
|
8
8
|
// http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
//
|
9
|
+
//
|
10
10
|
// Unless required by applicable law or agreed to in writing, software
|
11
11
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
12
12
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@@ -54,6 +54,7 @@
|
|
54
54
|
.mdc-checkbox {
|
55
55
|
display: inline-block;
|
56
56
|
position: relative;
|
57
|
+
box-sizing: content-box;
|
57
58
|
width: $mdc-checkbox-size;
|
58
59
|
height: $mdc-checkbox-size;
|
59
60
|
padding: ($mdc-checkbox-touch-area - $mdc-checkbox-size) / 2;
|
@@ -234,6 +235,19 @@ fieldset:disabled .mdc-checkbox__native-control,
|
|
234
235
|
}
|
235
236
|
}
|
236
237
|
|
238
|
+
.mdc-checkbox--upgraded {
|
239
|
+
.mdc-checkbox__background,
|
240
|
+
.mdc-checkbox__checkmark,
|
241
|
+
.mdc-checkbox__checkmark__path,
|
242
|
+
.mdc-checkbox__mixedmark {
|
243
|
+
// Due to the myriad of selector combos used to properly style a CSS-only checkbox, all of
|
244
|
+
// which have varying selector precedence and make use of transitions, it is cleaner and more
|
245
|
+
// efficient here to simply use !important, since the mdc-checkbox--anim-* classes will take
|
246
|
+
// over from here.
|
247
|
+
transition: none !important;
|
248
|
+
}
|
249
|
+
}
|
250
|
+
|
237
251
|
.mdc-checkbox--anim {
|
238
252
|
$_mdc-checkbox-indeterminate-change-duration: 500ms;
|
239
253
|
|
@@ -67,6 +67,7 @@
|
|
67
67
|
width: calc(100% - 56px);
|
68
68
|
max-width: 280px;
|
69
69
|
height: 100%;
|
70
|
+
transform: translateX(-107%);
|
70
71
|
transform: translateX(calc(-100% - 20px));
|
71
72
|
will-change: transform;
|
72
73
|
box-sizing: border-box;
|
@@ -74,6 +75,7 @@
|
|
74
75
|
touch-action: none;
|
75
76
|
|
76
77
|
@include mdc-rtl(".mdc-temporary-drawer") {
|
78
|
+
transform: translateX(107%);
|
77
79
|
transform: translateX(calc(100% + 20px));
|
78
80
|
}
|
79
81
|
|
@@ -96,6 +98,7 @@
|
|
96
98
|
|
97
99
|
&__footer {
|
98
100
|
@include mdc-elevation(2);
|
101
|
+
|
99
102
|
flex-shrink: 0;
|
100
103
|
}
|
101
104
|
|
@@ -30,9 +30,9 @@
|
|
30
30
|
}
|
31
31
|
|
32
32
|
#{$mdc-elevation-property}:
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
map-get($mdc-elevation-umbra-map, $z-value) $mdc-elevation-umbra-color,
|
34
|
+
map-get($mdc-elevation-penumbra-map, $z-value) $mdc-elevation-penumbra-color,
|
35
|
+
map-get($mdc-elevation-ambient-map, $z-value) $mdc-elevation-ambient-color;
|
36
36
|
}
|
37
37
|
|
38
38
|
/**
|
@@ -67,7 +67,6 @@
|
|
67
67
|
align-items: stretch;
|
68
68
|
margin: 0 auto;
|
69
69
|
box-sizing: border-box;
|
70
|
-
|
71
70
|
padding: $margin - $gutter / 2;
|
72
71
|
padding: calc(var(--mdc-layout-grid-margin, #{$margin}) - var(--mdc-layout-grid-gutter, #{$gutter}) / 2);
|
73
72
|
|
@@ -79,7 +78,6 @@
|
|
79
78
|
display: grid;
|
80
79
|
grid-gap: $gutter;
|
81
80
|
grid-gap: var(--mdc-layout-grid-gutter, $gutter);
|
82
|
-
|
83
81
|
padding: $margin;
|
84
82
|
padding: var(--mdc-layout-grid-margin, #{$margin});
|
85
83
|
|
@@ -121,12 +121,16 @@
|
|
121
121
|
pointer-events: none;
|
122
122
|
// Imitate native disabled functionality
|
123
123
|
user-select: none;
|
124
|
+
}
|
124
125
|
|
125
|
-
|
126
|
-
|
127
|
-
@include mdc-
|
126
|
+
@each $sel in ("mdc-select--disabled", "mdc-select[disabled]") {
|
127
|
+
.#{$sel} {
|
128
|
+
@include mdc-theme-dark(".mdc-select", true) {
|
129
|
+
@include mdc-theme-prop(color, text-disabled-on-dark);
|
130
|
+
@include mdc-select-dd-arrow-svg-bg_(ffffff, .38);
|
128
131
|
|
129
|
-
|
132
|
+
border-bottom: 1px dotted rgba(white, .38);
|
133
|
+
}
|
130
134
|
}
|
131
135
|
}
|
132
136
|
|
@@ -244,7 +248,6 @@
|
|
244
248
|
@include mdc-theme-dark {
|
245
249
|
@include mdc-theme-prop(background-color, text-primary-on-dark);
|
246
250
|
}
|
247
|
-
|
248
251
|
}
|
249
252
|
// stylelint-enable plugin/selector-bem-pattern
|
250
253
|
}
|
@@ -70,7 +70,6 @@
|
|
70
70
|
background-color: $mdc-switch-unchecked-track-color-dark;
|
71
71
|
opacity: .3;
|
72
72
|
}
|
73
|
-
|
74
73
|
}
|
75
74
|
|
76
75
|
// postcss-bem-linter: ignore
|
@@ -117,7 +116,6 @@
|
|
117
116
|
}
|
118
117
|
|
119
118
|
.mdc-switch__native-control:focus ~ .mdc-switch__background {
|
120
|
-
|
121
119
|
.mdc-switch__knob {
|
122
120
|
&::before {
|
123
121
|
position: absolute;
|
@@ -134,15 +132,14 @@
|
|
134
132
|
background-color: $mdc-switch-unchecked-focus-ring-color-dark;
|
135
133
|
opacity: .14;
|
136
134
|
}
|
137
|
-
|
138
135
|
}
|
139
136
|
}
|
140
137
|
}
|
141
138
|
|
142
139
|
.mdc-switch__native-control:checked ~ .mdc-switch__background {
|
143
|
-
|
144
140
|
&::before {
|
145
141
|
@include mdc-theme-prop(background-color, primary);
|
142
|
+
|
146
143
|
opacity: .5;
|
147
144
|
}
|
148
145
|
|
@@ -173,7 +170,6 @@
|
|
173
170
|
}
|
174
171
|
|
175
172
|
.mdc-switch__native-control:disabled ~ .mdc-switch__background {
|
176
|
-
|
177
173
|
&::before {
|
178
174
|
background-color: $mdc-switch-unchecked-track-color;
|
179
175
|
opacity: .12;
|
@@ -257,7 +257,7 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
|
|
257
257
|
@include mdc-theme-dark(".mdc-textfield", true) {
|
258
258
|
// stylelint-disable plugin/selector-bem-pattern
|
259
259
|
+ .mdc-textfield-helptext {
|
260
|
-
@include mdc-theme-prop(
|
260
|
+
@include mdc-theme-prop(color, text-disabled-on-dark);
|
261
261
|
}
|
262
262
|
// stylelint-enable plugin/selector-bem-pattern
|
263
263
|
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2016 Google Inc. All Rights Reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
@import "@material/elevation/mixins";
|
18
|
+
@import "@material/rtl/mixins";
|
19
|
+
@import "@material/theme/mixins";
|
20
|
+
@import "@material/typography/mixins";
|
21
|
+
|
22
|
+
$mdc-toolbar-height: 64px;
|
23
|
+
$mdc-toolbar-mobile-height: 56px;
|
24
|
+
$mdc-toolbar-padding: 24px 16px;
|
25
|
+
$mdc-toolbar-mobile-padding: 16px;
|
26
|
+
|
27
|
+
$mdc-toolbar-mobile-breakpoint: 599px;
|
28
|
+
|
29
|
+
// postcss-bem-linter: define toolbar
|
30
|
+
.mdc-toolbar {
|
31
|
+
display: flex;
|
32
|
+
position: relative;
|
33
|
+
align-items: center;
|
34
|
+
justify-content: space-between;
|
35
|
+
width: 100%;
|
36
|
+
height: $mdc-toolbar-height;
|
37
|
+
padding: $mdc-toolbar-padding;
|
38
|
+
box-sizing: border-box;
|
39
|
+
|
40
|
+
@include mdc-theme-prop(background-color, primary);
|
41
|
+
@include mdc-theme-prop(color, text-primary-on-primary);
|
42
|
+
|
43
|
+
// TODO: refactor this out when #23 is implemented
|
44
|
+
@media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
45
|
+
height: $mdc-toolbar-mobile-height;
|
46
|
+
padding: $mdc-toolbar-mobile-padding;
|
47
|
+
}
|
48
|
+
|
49
|
+
&__section {
|
50
|
+
display: inline-flex;
|
51
|
+
flex: 1;
|
52
|
+
align-items: center;
|
53
|
+
justify-content: center;
|
54
|
+
|
55
|
+
&--align-start {
|
56
|
+
justify-content: flex-start;
|
57
|
+
order: -1;
|
58
|
+
}
|
59
|
+
|
60
|
+
&--align-end {
|
61
|
+
justify-content: flex-end;
|
62
|
+
order: 1;
|
63
|
+
}
|
64
|
+
|
65
|
+
.mdc-toolbar__title {
|
66
|
+
@include mdc-typography(title);
|
67
|
+
|
68
|
+
margin: 0;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
.mdc-toolbar--fixed {
|
74
|
+
position: fixed;
|
75
|
+
top: 0;
|
76
|
+
left: 0;
|
77
|
+
z-index: 1;
|
78
|
+
|
79
|
+
@include mdc-elevation(4);
|
80
|
+
}
|
81
|
+
|
82
|
+
// postcss-bem-linter: end
|
83
|
+
|
84
|
+
.mdc-toolbar-fixed-adjust {
|
85
|
+
margin-top: $mdc-toolbar-height;
|
86
|
+
|
87
|
+
@media (max-width: 599px) {
|
88
|
+
margin-top: $mdc-toolbar-mobile-height;
|
89
|
+
}
|
90
|
+
}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
$mdc-typography-font-family: Roboto, sans-serif;
|
16
|
+
$mdc-typography-font-family: Roboto, sans-serif !default;
|
17
17
|
|
18
18
|
$mdc-typography-font-weight-values: (
|
19
19
|
thin: 100,
|
@@ -22,7 +22,7 @@ $mdc-typography-font-weight-values: (
|
|
22
22
|
medium: 500,
|
23
23
|
bold: 700,
|
24
24
|
black: 900
|
25
|
-
);
|
25
|
+
) !default;
|
26
26
|
|
27
27
|
/* TODO(sgomes): Figure out what to do about desktop font sizes. */
|
28
28
|
|
@@ -106,4 +106,4 @@ $mdc-typography-styles: (
|
|
106
106
|
letter-spacing: .08em,
|
107
107
|
margin: -.5rem 0 1rem -.04em /* -8sp 0 16sp -.04em */
|
108
108
|
)
|
109
|
-
);
|
109
|
+
) !default;
|
@@ -33,6 +33,7 @@
|
|
33
33
|
@import "@material/switch/mdc-switch";
|
34
34
|
@import "@material/textfield/mdc-textfield";
|
35
35
|
@import "@material/theme/mdc-theme";
|
36
|
+
@import "@material/toolbar/mdc-toolbar";
|
36
37
|
@import "@material/typography/mdc-typography";
|
37
38
|
@import "@material/fonts/material-icons";
|
38
39
|
@import "@material/fonts/roboto";
|
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.5.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-02-
|
11
|
+
date: 2017-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autoprefixer-rails
|
@@ -168,6 +168,7 @@ files:
|
|
168
168
|
- vendor/assets/stylesheets/@material/theme/_mixins.scss
|
169
169
|
- vendor/assets/stylesheets/@material/theme/_variables.scss
|
170
170
|
- vendor/assets/stylesheets/@material/theme/mdc-theme.scss
|
171
|
+
- vendor/assets/stylesheets/@material/toolbar/mdc-toolbar.scss
|
171
172
|
- vendor/assets/stylesheets/@material/typography/_mixins.scss
|
172
173
|
- vendor/assets/stylesheets/@material/typography/_variables.scss
|
173
174
|
- vendor/assets/stylesheets/@material/typography/mdc-typography.scss
|