material_components_web-sass 0.9.1 → 0.10.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 +928 -366
- data/vendor/assets/stylesheets/@material/drawer/_mixins.scss +6 -0
- data/vendor/assets/stylesheets/@material/drawer/persistent/mdc-persistent-drawer.scss +4 -4
- data/vendor/assets/stylesheets/@material/toolbar/mdc-toolbar.scss +88 -4
- metadata +1 -1
@@ -82,6 +82,12 @@
|
|
82
82
|
text-decoration: none;
|
83
83
|
|
84
84
|
@include mdc-typography(body2);
|
85
|
+
|
86
|
+
// Remove the 16px left offset since we already expand the padding of the list item to take up
|
87
|
+
// the width of the drawer.
|
88
|
+
&.mdc-ripple-upgraded {
|
89
|
+
left: 0;
|
90
|
+
}
|
85
91
|
}
|
86
92
|
|
87
93
|
.mdc-list-item__start-detail {
|
@@ -29,6 +29,7 @@ $mdc-persistent-drawer-dark-theme-bg-color: #212121 !default;
|
|
29
29
|
|
30
30
|
.mdc-persistent-drawer {
|
31
31
|
@include mdc-drawer-base_;
|
32
|
+
|
32
33
|
width: 0;
|
33
34
|
|
34
35
|
&__drawer {
|
@@ -47,24 +48,23 @@ $mdc-persistent-drawer-dark-theme-bg-color: #212121 !default;
|
|
47
48
|
@include mdc-slideable-drawer;
|
48
49
|
|
49
50
|
@include mdc-rtl(".mdc-persistent-drawer") {
|
50
|
-
|
51
|
+
@include mdc-slideable-drawer-rtl;
|
51
52
|
}
|
52
53
|
|
53
54
|
display: inline-flex;
|
54
55
|
flex-direction: column;
|
55
56
|
box-sizing: border-box;
|
57
|
+
width: $mdc-persistent-drawer-width;
|
56
58
|
overflow: hidden;
|
57
59
|
touch-action: none;
|
58
|
-
width: $mdc-persistent-drawer-width;
|
59
60
|
}
|
60
61
|
|
61
62
|
&--animating {
|
62
|
-
|
63
63
|
.mdc-persistent-drawer__drawer {
|
64
64
|
transition: $mdc-slidable-drawer-transition;
|
65
65
|
}
|
66
66
|
|
67
|
-
&.mdc-persistent-drawer--open .mdc-persistent-drawer__drawer
|
67
|
+
&.mdc-persistent-drawer--open .mdc-persistent-drawer__drawer {
|
68
68
|
transition: $mdc-slidable-drawer-transition-open;
|
69
69
|
}
|
70
70
|
}
|
@@ -24,6 +24,8 @@ $mdc-toolbar-mobile-row-height: 56px;
|
|
24
24
|
$mdc-toolbar-padding: 20px 28px;
|
25
25
|
$mdc-toolbar-mobile-padding: 16px;
|
26
26
|
|
27
|
+
$mdc-toolbar-ratio-to-extend-flexible: 4 !default;
|
28
|
+
|
27
29
|
$mdc-toolbar-mobile-breakpoint: 599px;
|
28
30
|
|
29
31
|
// postcss-bem-linter: define toolbar
|
@@ -58,8 +60,8 @@ $mdc-toolbar-mobile-breakpoint: 599px;
|
|
58
60
|
flex: 1;
|
59
61
|
align-items: flex-start;
|
60
62
|
justify-content: center;
|
63
|
+
min-width: 0;
|
61
64
|
z-index: 1;
|
62
|
-
overflow: hidden;
|
63
65
|
|
64
66
|
&--align-start {
|
65
67
|
justify-content: flex-start;
|
@@ -75,11 +77,12 @@ $mdc-toolbar-mobile-breakpoint: 599px;
|
|
75
77
|
&__title {
|
76
78
|
@include mdc-typography(title);
|
77
79
|
|
78
|
-
overflow: hidden;
|
79
|
-
text-overflow: ellipsis;
|
80
|
-
white-space: nowrap;
|
81
80
|
margin: 0;
|
82
81
|
line-height: 1.5rem;
|
82
|
+
text-overflow: ellipsis;
|
83
|
+
white-space: nowrap;
|
84
|
+
overflow: hidden;
|
85
|
+
z-index: 1;
|
83
86
|
}
|
84
87
|
}
|
85
88
|
|
@@ -92,6 +95,87 @@ $mdc-toolbar-mobile-breakpoint: 599px;
|
|
92
95
|
@include mdc-elevation(4);
|
93
96
|
}
|
94
97
|
|
98
|
+
.mdc-toolbar--flexible {
|
99
|
+
// stylelint-disable plugin/selector-bem-pattern
|
100
|
+
// bem linter is disabled because it cannot correctly reconcile mdc prefix for css variables.
|
101
|
+
--mdc-toolbar-ratio-to-extend-flexible: $mdc-toolbar-ratio-to-extend-flexible;
|
102
|
+
// stylelint-enable plugin/selector-bem-pattern
|
103
|
+
|
104
|
+
.mdc-toolbar__row:first-child {
|
105
|
+
height: $mdc-toolbar-row-height * $mdc-toolbar-ratio-to-extend-flexible;
|
106
|
+
height: calc(#{$mdc-toolbar-row-height} * var(--mdc-toolbar-ratio-to-extend-flexible, #{$mdc-toolbar-ratio-to-extend-flexible}));
|
107
|
+
|
108
|
+
@media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
109
|
+
height: $mdc-toolbar-mobile-row-height * $mdc-toolbar-ratio-to-extend-flexible;
|
110
|
+
height: calc(#{$mdc-toolbar-mobile-row-height} * var(--mdc-toolbar-ratio-to-extend-flexible, #{$mdc-toolbar-ratio-to-extend-flexible}));
|
111
|
+
}
|
112
|
+
|
113
|
+
&::after {
|
114
|
+
// The style ensures the pseudo element will be defined and can easily be styled
|
115
|
+
position: absolute;
|
116
|
+
content: "";
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
// stylelint-disable plugin/selector-bem-pattern
|
121
|
+
// bem linter is disabled because it cannot handle multiple top level selector
|
122
|
+
&-default-behavior {
|
123
|
+
.mdc-toolbar__title {
|
124
|
+
@include mdc-typography(display1);
|
125
|
+
|
126
|
+
transform: translateY($mdc-toolbar-row-height * ($mdc-toolbar-ratio-to-extend-flexible - 1));
|
127
|
+
transform: translateY(calc(#{$mdc-toolbar-row-height} * (var(--mdc-toolbar-ratio-to-extend-flexible, #{$mdc-toolbar-ratio-to-extend-flexible}) - 1)));
|
128
|
+
font-weight: #{map-get($mdc-typography-font-weight-values, normal)};
|
129
|
+
line-height: 1.5rem;
|
130
|
+
|
131
|
+
@media (max-width: $mdc-toolbar-mobile-breakpoint) {
|
132
|
+
transform: translateY($mdc-toolbar-mobile-row-height * ($mdc-toolbar-ratio-to-extend-flexible - 1));
|
133
|
+
transform: translateY(calc(#{$mdc-toolbar-mobile-row-height} * (var(--mdc-toolbar-ratio-to-extend-flexible, #{$mdc-toolbar-ratio-to-extend-flexible}) - 1)));
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
.mdc-toolbar__row:first-child::after {
|
138
|
+
top: 0;
|
139
|
+
left: 0;
|
140
|
+
width: 100%;
|
141
|
+
height: 100%;
|
142
|
+
transition: opacity .2s ease;
|
143
|
+
opacity: 1;
|
144
|
+
}
|
145
|
+
|
146
|
+
&.mdc-toolbar--flexible-space-minimized {
|
147
|
+
.mdc-toolbar__row:first-child::after {
|
148
|
+
opacity: 0;
|
149
|
+
}
|
150
|
+
|
151
|
+
.mdc-toolbar__title {
|
152
|
+
font-weight: #{map-get($mdc-typography-font-weight-values, medium)};
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
// stylelint-enable plugin/selector-bem-pattern
|
157
|
+
}
|
158
|
+
|
159
|
+
.mdc-toolbar--waterfall {
|
160
|
+
&.mdc-toolbar--fixed {
|
161
|
+
@include mdc-elevation(0);
|
162
|
+
@include mdc-elevation-transition;
|
163
|
+
|
164
|
+
&.mdc-toolbar--flexible-space-minimized {
|
165
|
+
@include mdc-elevation(4);
|
166
|
+
}
|
167
|
+
|
168
|
+
&.mdc-toolbar--fixed-lastrow-only {
|
169
|
+
&.mdc-toolbar--flexible-space-minimized {
|
170
|
+
@include mdc-elevation(0);
|
171
|
+
}
|
172
|
+
|
173
|
+
&.mdc-toolbar--fixed-at-last-row {
|
174
|
+
@include mdc-elevation(4);
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
95
179
|
// postcss-bem-linter: end
|
96
180
|
|
97
181
|
.mdc-toolbar-fixed-adjust {
|