material-sass 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/Rakefile +4 -4
- data/assets/javascripts/material-sprockets.js +0 -1
- data/assets/javascripts/material.js +2994 -2927
- data/assets/javascripts/material.min.js +10 -10
- data/assets/javascripts/material/components/expansion-panel.js +1 -3
- data/assets/javascripts/material/components/floating-label.js +2 -3
- data/assets/javascripts/material/components/nav-drawer.js +10 -32
- data/assets/javascripts/material/components/pickdate.js +228 -0
- data/assets/javascripts/material/components/selection-control-focus.js +2 -2
- data/assets/javascripts/material/components/tab-switch.js +4 -20
- data/assets/javascripts/material/components/util.js +16 -1
- data/assets/stylesheets/material/_colors.scss +2 -0
- data/assets/stylesheets/material/_functions.scss +6 -0
- data/assets/stylesheets/material/_mixins.scss +0 -2
- data/assets/stylesheets/material/_print.scss +26 -1
- data/assets/stylesheets/material/_utilities.scss +1 -0
- data/assets/stylesheets/material/base/_base.scss +5 -2
- data/assets/stylesheets/material/bootstrap/_breadcrumb.scss +10 -7
- data/assets/stylesheets/material/bootstrap/_popover.scss +1 -2
- data/assets/stylesheets/material/bootstrap/_transition.scss +6 -10
- data/assets/stylesheets/material/material.scss +2 -0
- data/assets/stylesheets/material/material/_card.scss +58 -96
- data/assets/stylesheets/material/material/_chip.scss +1 -0
- data/assets/stylesheets/material/material/_data-table.scss +57 -1
- data/assets/stylesheets/material/material/_dialog.scss +2 -2
- data/assets/stylesheets/material/material/_expansion-panel.scss +4 -0
- data/assets/stylesheets/material/material/_menu.scss +164 -54
- data/assets/stylesheets/material/material/_navdrawer.scss +5 -6
- data/assets/stylesheets/material/material/_picker.scss +78 -67
- data/assets/stylesheets/material/material/_progress.scss +1 -6
- data/assets/stylesheets/material/material/_selection-control.scss +1 -1
- data/assets/stylesheets/material/material/_slider.scss +157 -0
- data/assets/stylesheets/material/material/_snackbar.scss +125 -0
- data/assets/stylesheets/material/material/_text-field-input-group.scss +101 -10
- data/assets/stylesheets/material/material/_text-field.scss +10 -15
- data/assets/stylesheets/material/material/_toolbar.scss +0 -16
- data/assets/stylesheets/material/material/_tooltip.scss +2 -2
- data/assets/stylesheets/material/mixins/_form.scss +2 -1
- data/assets/stylesheets/material/mixins/_nav-divider.scss +2 -2
- data/assets/stylesheets/material/mixins/_screenreader.scss +0 -2
- data/assets/stylesheets/material/mixins/_text-hide.scss +2 -0
- data/assets/stylesheets/material/mixins/_transition.scss +20 -0
- data/assets/stylesheets/material/utilities/_background.scss +5 -0
- data/assets/stylesheets/material/utilities/_flex.scss +17 -1
- data/assets/stylesheets/material/utilities/_position.scss +1 -0
- data/assets/stylesheets/material/utilities/_shadows.scss +23 -0
- data/assets/stylesheets/material/utilities/_text.scss +18 -0
- data/assets/stylesheets/material/variables/_elevation-shadow.scss +53 -47
- data/assets/stylesheets/material/variables/_palette.scss +9 -8
- data/assets/stylesheets/material/variables/_spacer.scss +2 -0
- data/assets/stylesheets/material/variables/_transition.scss +2 -0
- data/assets/stylesheets/material/variables/_typography.scss +3 -3
- data/assets/stylesheets/material/variables/_variable-bootstrap.scss +9 -8
- data/assets/stylesheets/material/variables/_variable-material.scss +56 -18
- data/lib/material-sass/version.rb +1 -1
- metadata +6 -6
- data/assets/javascripts/material/addons/pickadate.js +0 -152
- data/assets/stylesheets/material.min.css +0 -13
- data/assets/stylesheets/material/mixins/_hex-to-rgba.scss +0 -3
- data/assets/stylesheets/material/mixins/_strip-unit.scss +0 -3
@@ -121,25 +121,19 @@
|
|
121
121
|
}
|
122
122
|
|
123
123
|
// stylelint-disable selector-no-qualifying-type
|
124
|
-
select {
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
}
|
124
|
+
select.form-control {
|
125
|
+
&[multiple],
|
126
|
+
&[size] {
|
127
|
+
@extend %form-textarea;
|
128
|
+
}
|
130
129
|
|
131
|
-
|
132
|
-
|
133
|
-
}
|
130
|
+
&:not([multiple]):not([size]) {
|
131
|
+
@extend %form-select;
|
134
132
|
}
|
135
133
|
}
|
136
|
-
// stylelint-enable
|
137
134
|
|
138
|
-
|
139
|
-
textarea
|
140
|
-
&.form-control:not(.textarea-autosize) {
|
141
|
-
@extend %form-textarea;
|
142
|
-
}
|
135
|
+
textarea.form-control:not(.textarea-autosize) {
|
136
|
+
@extend %form-textarea;
|
143
137
|
}
|
144
138
|
// stylelint-enable
|
145
139
|
|
@@ -149,6 +143,7 @@ textarea {
|
|
149
143
|
@include form-control-size($textfield-font-size, $textfield-height, $textfield-line-height, $textfield-padding-x, $textfield-padding-y);
|
150
144
|
|
151
145
|
border-color: transparent;
|
146
|
+
color: $textfield-plaintext-color;
|
152
147
|
display: block;
|
153
148
|
width: 100%;
|
154
149
|
|
@@ -8,21 +8,6 @@
|
|
8
8
|
padding: $toolbar-padding-y $toolbar-padding-x;
|
9
9
|
position: relative;
|
10
10
|
|
11
|
-
// Horizontally align `.dropdown-menu-right` in `.navbar`
|
12
|
-
|
13
|
-
.dropdown-menu-right {
|
14
|
-
right: 0;
|
15
|
-
left: auto;
|
16
|
-
|
17
|
-
&.menu::before {
|
18
|
-
transform-origin: 100% ($menu-link-height / 2 + $menu-padding-y);
|
19
|
-
}
|
20
|
-
|
21
|
-
&::before {
|
22
|
-
transform-origin: 100% 0;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
11
|
// Vertically align some elements normally placed in `.navbar`
|
27
12
|
|
28
13
|
.form-control {
|
@@ -389,7 +374,6 @@
|
|
389
374
|
@include set-material-icons;
|
390
375
|
|
391
376
|
display: block;
|
392
|
-
margin: auto;
|
393
377
|
|
394
378
|
&::before {
|
395
379
|
content: $toolbar-toggler-icon;
|
@@ -10,7 +10,7 @@
|
|
10
10
|
word-break: break-word;
|
11
11
|
z-index: $tooltip-zindex;
|
12
12
|
|
13
|
-
@include media-breakpoint-up(
|
13
|
+
@include media-breakpoint-up($tooltip-breakpoint) {
|
14
14
|
font-size: $tooltip-font-size-desktop;
|
15
15
|
margin: $tooltip-margin-desktop;
|
16
16
|
}
|
@@ -34,7 +34,7 @@
|
|
34
34
|
text-align: center;
|
35
35
|
transform: scale($tooltip-scale);
|
36
36
|
|
37
|
-
@include media-breakpoint-up(
|
37
|
+
@include media-breakpoint-up($tooltip-breakpoint) {
|
38
38
|
padding: $tooltip-padding-y-desktop $tooltip-padding-x-desktop;
|
39
39
|
}
|
40
40
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
@mixin sr-only {
|
2
2
|
border: 0;
|
3
3
|
clip: rect(0, 0, 0, 0);
|
4
|
-
clip-path: inset(50%);
|
5
4
|
height: 1px;
|
6
5
|
overflow: hidden;
|
7
6
|
padding: 0;
|
@@ -14,7 +13,6 @@
|
|
14
13
|
&:active,
|
15
14
|
&:focus {
|
16
15
|
clip: auto;
|
17
|
-
clip-path: none;
|
18
16
|
height: auto;
|
19
17
|
overflow: visible;
|
20
18
|
position: static;
|
@@ -12,6 +12,10 @@
|
|
12
12
|
@include media-breakpoint-up(lg) {
|
13
13
|
transition-duration: $transition-duration-desktop-leaving;
|
14
14
|
}
|
15
|
+
|
16
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
17
|
+
transition: none;
|
18
|
+
}
|
15
19
|
}
|
16
20
|
|
17
21
|
// Deceleration curve: entering the screen
|
@@ -28,6 +32,10 @@
|
|
28
32
|
@include media-breakpoint-up(lg) {
|
29
33
|
transition-duration: $transition-duration-desktop-entering;
|
30
34
|
}
|
35
|
+
|
36
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
37
|
+
transition: none;
|
38
|
+
}
|
31
39
|
}
|
32
40
|
|
33
41
|
// Sharp curve: temporarily leaving the screen
|
@@ -44,6 +52,10 @@
|
|
44
52
|
@include media-breakpoint-up(lg) {
|
45
53
|
transition-duration: $transition-duration-desktop-leaving;
|
46
54
|
}
|
55
|
+
|
56
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
57
|
+
transition: none;
|
58
|
+
}
|
47
59
|
}
|
48
60
|
|
49
61
|
// Standard curve: relative movement
|
@@ -60,6 +72,10 @@
|
|
60
72
|
@include media-breakpoint-up(lg) {
|
61
73
|
transition-duration: $transition-duration-desktop;
|
62
74
|
}
|
75
|
+
|
76
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
77
|
+
transition: none;
|
78
|
+
}
|
63
79
|
}
|
64
80
|
|
65
81
|
// Standard curve: relative movement - complex, full-screen, large transitions
|
@@ -76,4 +92,8 @@
|
|
76
92
|
@include media-breakpoint-up(lg) {
|
77
93
|
transition-duration: $transition-duration-desktop-complex;
|
78
94
|
}
|
95
|
+
|
96
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
97
|
+
transition: none;
|
98
|
+
}
|
79
99
|
}
|
@@ -17,3 +17,8 @@
|
|
17
17
|
@each $color, $values in $theme-colors {
|
18
18
|
@include bg-variant('.bg-#{$color}', theme-color($color), theme-color-dark($color));
|
19
19
|
}
|
20
|
+
|
21
|
+
@include bg-variant('.bg-primary-dark', theme-color-dark(primary));
|
22
|
+
@include bg-variant('.bg-primary-light', theme-color-light(primary));
|
23
|
+
@include bg-variant('.bg-secondary-dark', theme-color-dark(secondary));
|
24
|
+
@include bg-variant('.bg-secondary-light', theme-color-light(secondary));
|
@@ -96,16 +96,32 @@
|
|
96
96
|
flex-direction: row-reverse !important;
|
97
97
|
}
|
98
98
|
|
99
|
-
// Flex
|
99
|
+
// Flex
|
100
100
|
|
101
101
|
.flex#{$infix}-fill {
|
102
102
|
flex: 1 1 auto !important;
|
103
103
|
}
|
104
104
|
|
105
|
+
.flex#{$infix}-grow-0 {
|
106
|
+
flex-grow: 0 !important;
|
107
|
+
}
|
108
|
+
|
109
|
+
.flex#{$infix}-grow-1 {
|
110
|
+
flex-grow: 1 !important;
|
111
|
+
}
|
112
|
+
|
105
113
|
.flex#{$infix}-nowrap {
|
106
114
|
flex-wrap: nowrap !important;
|
107
115
|
}
|
108
116
|
|
117
|
+
.flex#{$infix}-shrink-0 {
|
118
|
+
flex-shrink: 0 !important;
|
119
|
+
}
|
120
|
+
|
121
|
+
.flex#{$infix}-shrink-1 {
|
122
|
+
flex-shrink: 1 !important;
|
123
|
+
}
|
124
|
+
|
109
125
|
.flex#{$infix}-wrap {
|
110
126
|
flex-wrap: wrap !important;
|
111
127
|
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
// stylelint-disable declaration-no-important
|
2
|
+
|
3
|
+
.shadow {
|
4
|
+
box-shadow: map-get($shadows, 8) !important;
|
5
|
+
}
|
6
|
+
|
7
|
+
.shadow-lg {
|
8
|
+
box-shadow: map-get($shadows, 24) !important;
|
9
|
+
}
|
10
|
+
|
11
|
+
.shadow-none {
|
12
|
+
box-shadow: none !important;
|
13
|
+
}
|
14
|
+
|
15
|
+
.shadow-sm {
|
16
|
+
box-shadow: map-get($shadows, 2) !important;
|
17
|
+
}
|
18
|
+
|
19
|
+
@each $shadow, $value in $shadows {
|
20
|
+
.shadow-#{$shadow} {
|
21
|
+
box-shadow: $value !important;
|
22
|
+
}
|
23
|
+
}
|
@@ -50,6 +50,24 @@
|
|
50
50
|
@include text-emphasis-variant('.text-#{$color}', theme-color($color), theme-color-dark($color));
|
51
51
|
}
|
52
52
|
|
53
|
+
.text-black-50 {
|
54
|
+
color: rgba($black, 0.5) !important;
|
55
|
+
}
|
56
|
+
|
57
|
+
.text-body {
|
58
|
+
color: $body-color !important;
|
59
|
+
}
|
60
|
+
|
61
|
+
.text-white-50 {
|
62
|
+
color: rgba($white, 0.5) !important;
|
63
|
+
}
|
64
|
+
|
65
|
+
// Family
|
66
|
+
|
67
|
+
.text-monospace {
|
68
|
+
font-family: $font-family-monospace;
|
69
|
+
}
|
70
|
+
|
53
71
|
// Italcs and weight
|
54
72
|
|
55
73
|
.font-italic {
|
@@ -1,14 +1,16 @@
|
|
1
1
|
// Elevation
|
2
2
|
// Based on https://material.google.com/what-is-material/elevation-shadows.html#elevation-shadows-elevation-android-
|
3
3
|
|
4
|
-
$
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
$elevations: (
|
5
|
+
24: (24 * 10),
|
6
|
+
16: (16 * 10),
|
7
|
+
12: (12 * 10),
|
8
|
+
8: (8 * 10),
|
9
|
+
6: (6 * 10),
|
10
|
+
4: (4 * 10),
|
11
|
+
2: (2 * 10),
|
12
|
+
1: (1 * 10)
|
13
|
+
) !default;
|
12
14
|
|
13
15
|
// Shadow
|
14
16
|
// Based on https://material.google.com/what-is-material/elevation-shadows.html#elevation-shadows-shadows
|
@@ -17,47 +19,51 @@ $shadow-color-1: rgba(0, 0, 0, 0.14) !default;
|
|
17
19
|
$shadow-color-2: rgba(0, 0, 0, 0.12) !default;
|
18
20
|
$shadow-color-3: rgba(0, 0, 0, 0.2) !default;
|
19
21
|
|
20
|
-
$
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
$shadows: (
|
23
|
+
24: unquote('0 24px 38px 3px #{$shadow-color-1}, 0 9px 46px 8px #{$shadow-color-2}, 0 11px 15px 0 #{$shadow-color-3}'),
|
24
|
+
16: unquote('0 16px 24px 2px #{$shadow-color-1}, 0 6px 30px 5px #{$shadow-color-2}, 0 8px 10px 0 #{$shadow-color-3}'),
|
25
|
+
12: unquote('0 12px 17px 2px #{$shadow-color-1}, 0 5px 22px 4px #{$shadow-color-2}, 0 7px 8px 0 #{$shadow-color-3}'),
|
26
|
+
8: unquote('0 8px 10px 1px #{$shadow-color-1}, 0 3px 14px 3px #{$shadow-color-2}, 0 4px 15px 0 #{$shadow-color-3}'),
|
27
|
+
6: unquote('0 6px 10px 0 #{$shadow-color-1}, 0 1px 18px 0 #{$shadow-color-2}, 0 3px 5px 0 #{$shadow-color-3}'),
|
28
|
+
4: unquote('0 2px 4px 0 #{$shadow-color-1}, 0 4px 5px 0 #{$shadow-color-2}, 0 1px 10px 0 #{$shadow-color-3}'),
|
29
|
+
2: unquote('0 0 4px 0 #{$shadow-color-1}, 0 3px 4px 0 #{$shadow-color-2}, 0 1px 5px 0 #{$shadow-color-3}'),
|
30
|
+
1: unquote('0 0 2px 0 #{$shadow-color-1}, 0 2px 2px 0 #{$shadow-color-2}, 0 1px 3px 0 #{$shadow-color-3}')
|
31
|
+
) !default;
|
28
32
|
|
29
33
|
// Value pair
|
30
34
|
// Combination of elevation and shadow
|
31
35
|
|
32
|
-
$elevation-
|
33
|
-
|
34
|
-
|
35
|
-
)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
)
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
)
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
)
|
60
|
-
|
61
|
-
|
62
|
-
|
36
|
+
$elevation-shadows: (
|
37
|
+
24: (
|
38
|
+
elevation: map-get($elevations, 24),
|
39
|
+
shadow: map-get($shadows, 4)
|
40
|
+
),
|
41
|
+
16: (
|
42
|
+
elevation: map-get($elevations, 16),
|
43
|
+
shadow: map-get($shadows, 6)
|
44
|
+
),
|
45
|
+
12: (
|
46
|
+
elevation: map-get($elevations, 12),
|
47
|
+
shadow: map-get($shadows, 2)
|
48
|
+
),
|
49
|
+
8: (
|
50
|
+
elevation: map-get($elevations, 8),
|
51
|
+
shadow: map-get($shadows, 8)
|
52
|
+
),
|
53
|
+
6: (
|
54
|
+
elevation: map-get($elevations, 6),
|
55
|
+
shadow: map-get($shadows, 6)
|
56
|
+
),
|
57
|
+
4: (
|
58
|
+
elevation: map-get($elevations, 4),
|
59
|
+
shadow: map-get($shadows, 4)
|
60
|
+
),
|
61
|
+
2: (
|
62
|
+
elevation: map-get($elevations, 2),
|
63
|
+
shadow: map-get($shadows, 2)
|
64
|
+
),
|
65
|
+
1: (
|
66
|
+
elevation: map-get($elevations, 1),
|
67
|
+
shadow: map-get($shadows, 1)
|
68
|
+
)
|
63
69
|
) !default;
|
@@ -50,16 +50,17 @@ $light: (
|
|
50
50
|
) !default;
|
51
51
|
|
52
52
|
$theme-colors: () !default;
|
53
|
+
// stylelint-disable-next-line scss/dollar-variable-default
|
53
54
|
$theme-colors: map-merge(
|
54
55
|
(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
primary: $primary,
|
57
|
+
secondary: $secondary,
|
58
|
+
danger: $danger,
|
59
|
+
info: $info,
|
60
|
+
success: $success,
|
61
|
+
warning: $warning,
|
62
|
+
dark: $dark,
|
63
|
+
light: $light
|
63
64
|
),
|
64
65
|
$theme-colors
|
65
66
|
);
|
@@ -4,6 +4,7 @@ $border-radius: 2px !default;
|
|
4
4
|
$border-width: 1px !default;
|
5
5
|
|
6
6
|
$sizes: () !default;
|
7
|
+
// stylelint-disable-next-line scss/dollar-variable-default
|
7
8
|
$sizes: map-merge(
|
8
9
|
(
|
9
10
|
25: 25%,
|
@@ -23,6 +24,7 @@ $spacer-lg: ($spacer * 1.5) !default;
|
|
23
24
|
$spacer-xl: ($spacer * 3) !default;
|
24
25
|
|
25
26
|
$spacers: () !default;
|
27
|
+
// stylelint-disable-next-line scss/dollar-variable-default
|
26
28
|
$spacers: map-merge(
|
27
29
|
(
|
28
30
|
0: 0,
|