material-sass 4.0.0.alpha6 → 4.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +36 -8
- data/Rakefile +16 -3
- data/app/assets/javascripts/material-sprockets.js +6 -1
- data/app/assets/javascripts/material.js +654 -417
- data/app/assets/javascripts/material.min.js +1 -0
- data/app/assets/javascripts/material/addons/picker.date.js +234 -0
- data/app/assets/javascripts/material/addons/picker.js +172 -0
- data/app/assets/javascripts/material/addons/textarea-autosize.js +20 -2
- data/app/assets/javascripts/material/addons/waves.js +127 -0
- data/app/assets/javascripts/material/components/floating-label.js +92 -0
- data/app/assets/javascripts/material/components/navdrawer.js +353 -0
- data/app/assets/javascripts/material/components/selection-control-focus.js +47 -0
- data/app/assets/javascripts/material/components/tab-switch.js +148 -0
- data/app/assets/javascripts/material/components/util.js +133 -0
- data/app/assets/javascripts/material/initializers/picker.js +171 -0
- data/app/assets/javascripts/material/initializers/textarea-autosize.js +10 -0
- data/app/assets/javascripts/material/initializers/waves.js +13 -0
- data/app/assets/stylesheets/material/_colours.scss +324 -0
- data/app/assets/stylesheets/material/_functions.scss +65 -0
- data/app/assets/stylesheets/material/_mixins.scss +23 -23
- data/app/assets/stylesheets/material/_print.scss +102 -0
- data/app/assets/stylesheets/material/_utilities.scss +21 -17
- data/app/assets/stylesheets/material/_variables.scss +13 -42
- data/app/assets/stylesheets/material/base/_base.scss +420 -5
- data/app/assets/stylesheets/material/base/_grid.scss +34 -33
- data/app/assets/stylesheets/material/base/_typography.scss +165 -174
- data/app/assets/stylesheets/material/bootstrap/_alert.scss +32 -39
- data/app/assets/stylesheets/material/bootstrap/_badge.scss +34 -0
- data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +18 -18
- data/app/assets/stylesheets/material/bootstrap/_carousel.scss +127 -142
- data/app/assets/stylesheets/material/bootstrap/_close.scss +18 -19
- data/app/assets/stylesheets/material/bootstrap/_code.scss +10 -7
- data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +50 -56
- data/app/assets/stylesheets/material/bootstrap/_form.scss +159 -129
- data/app/assets/stylesheets/material/bootstrap/_image.scss +19 -16
- data/app/assets/stylesheets/material/bootstrap/_jumbotron.scss +10 -7
- data/app/assets/stylesheets/material/bootstrap/_nav.scss +71 -69
- data/app/assets/stylesheets/material/bootstrap/_pagination.scss +34 -26
- data/app/assets/stylesheets/material/bootstrap/_popover.scss +26 -59
- data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +4 -4
- data/app/assets/stylesheets/material/bootstrap/_transition.scss +10 -8
- data/app/assets/stylesheets/material/material.scss +75 -62
- data/app/assets/stylesheets/material/material/_button-flat.scss +26 -39
- data/app/assets/stylesheets/material/material/_button-float.scss +10 -14
- data/app/assets/stylesheets/material/material/_button-group.scss +268 -0
- data/app/assets/stylesheets/material/material/_button.scss +133 -189
- data/app/assets/stylesheets/material/material/_card.scss +300 -248
- data/app/assets/stylesheets/material/material/_chip.scss +65 -64
- data/app/assets/stylesheets/material/material/_data-table.scss +135 -45
- data/app/assets/stylesheets/material/material/_dialog.scss +141 -110
- data/app/assets/stylesheets/material/material/_expansion-panel.scss +86 -119
- data/app/assets/stylesheets/material/material/_menu.scss +308 -228
- data/app/assets/stylesheets/material/material/_navdrawer.scss +239 -234
- data/app/assets/stylesheets/material/material/_picker.scss +157 -155
- data/app/assets/stylesheets/material/material/_progress-circular.scss +80 -80
- data/app/assets/stylesheets/material/material/_progress.scss +180 -115
- data/app/assets/stylesheets/material/material/_selection-control.scss +132 -139
- data/app/assets/stylesheets/material/material/_stepper.scss +94 -93
- data/app/assets/stylesheets/material/material/_tab.scss +74 -93
- data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +29 -20
- data/app/assets/stylesheets/material/material/_text-field-input-group.scss +94 -24
- data/app/assets/stylesheets/material/material/_text-field-textarea.scss +13 -26
- data/app/assets/stylesheets/material/material/_text-field.scss +127 -118
- data/app/assets/stylesheets/material/material/_toolbar.scss +308 -313
- data/app/assets/stylesheets/material/material/_tooltip.scss +23 -62
- data/app/assets/stylesheets/material/mixins/_background-variant.scss +6 -6
- data/app/assets/stylesheets/material/mixins/_border-radius.scss +17 -17
- data/app/assets/stylesheets/material/mixins/_breakpoint.scss +32 -2
- data/app/assets/stylesheets/material/mixins/_clearfix.scss +1 -1
- data/app/assets/stylesheets/material/mixins/_form.scss +62 -25
- data/app/assets/stylesheets/material/mixins/_grid-framework.scss +8 -16
- data/app/assets/stylesheets/material/mixins/_grid.scss +40 -64
- data/app/assets/stylesheets/material/mixins/_material-icons.scss +36 -0
- data/app/assets/stylesheets/material/mixins/_nav-divider.scss +1 -1
- data/app/assets/stylesheets/material/mixins/_reset-text.scss +2 -21
- data/app/assets/stylesheets/material/mixins/_screenreader.scss +14 -12
- data/app/assets/stylesheets/material/mixins/_text-alignment.scss +23 -0
- data/app/assets/stylesheets/material/mixins/_text-emphasis.scss +6 -6
- data/app/assets/stylesheets/material/mixins/_transition.scss +42 -10
- data/app/assets/stylesheets/material/utilities/_background.scss +18 -18
- data/app/assets/stylesheets/material/utilities/_border.scss +88 -41
- data/app/assets/stylesheets/material/utilities/_display.scss +63 -30
- data/app/assets/stylesheets/material/utilities/_flex.scss +139 -134
- data/app/assets/stylesheets/material/utilities/_material-icons.scss +3 -5
- data/app/assets/stylesheets/material/utilities/_position.scss +19 -22
- data/app/assets/stylesheets/material/utilities/_sizing.scss +11 -12
- data/app/assets/stylesheets/material/utilities/_spacing.scss +51 -56
- data/app/assets/stylesheets/material/utilities/_text.scss +80 -75
- data/app/assets/stylesheets/material/utilities/_visibility.scss +5 -46
- data/app/assets/stylesheets/material/utilities/_waves.scss +11 -18
- data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +89 -82
- data/app/assets/stylesheets/material/variables/_grid.scss +29 -26
- data/app/assets/stylesheets/material/variables/_palette.scss +45 -0
- data/app/assets/stylesheets/material/variables/_spacer.scss +34 -88
- data/app/assets/stylesheets/material/variables/_transition.scss +29 -0
- data/app/assets/stylesheets/material/variables/_typography.scss +88 -74
- data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +196 -133
- data/app/assets/stylesheets/material/variables/_variable-material.scss +481 -429
- data/lib/material-sass/version.rb +1 -1
- data/material-sass.gemspec +3 -3
- metadata +26 -21
- data/app/assets/javascripts/material/addons-materialise/pickadate.js +0 -139
- data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +0 -11
- data/app/assets/javascripts/material/addons-materialise/wave.js +0 -15
- data/app/assets/javascripts/material/addons/pickadate.js +0 -7
- data/app/assets/javascripts/material/addons/wave.js +0 -5
- data/app/assets/javascripts/material/src/floating-label.js +0 -91
- data/app/assets/javascripts/material/src/navdrawer.js +0 -352
- data/app/assets/javascripts/material/src/tab-switch.js +0 -133
- data/app/assets/javascripts/material/src/util.js +0 -138
- data/app/assets/stylesheets/material/base/_normalize.scss +0 -253
- data/app/assets/stylesheets/material/base/_reboot.scss +0 -239
- data/app/assets/stylesheets/material/bootstrap/_button-group.scss +0 -134
- data/app/assets/stylesheets/material/mixins/_tab-focus.scss +0 -5
- data/app/assets/stylesheets/material/mixins/_transform.scss +0 -9
- data/app/assets/stylesheets/material/variables/_animation.scss +0 -22
- data/app/assets/stylesheets/material/variables/_colour.scss +0 -389
@@ -1,75 +1,70 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
@each $breakpoint in map-keys($grid-breakpoints) {
|
5
|
-
@include media-breakpoint-up($breakpoint) {
|
6
|
-
$infix: breakpoint-infix($breakpoint);
|
1
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
2
|
+
@include media-breakpoint-up($breakpoint) {
|
3
|
+
$infix: breakpoint-infix($breakpoint);
|
7
4
|
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
.m#{$infix}-auto {
|
6
|
+
margin: auto !important;
|
7
|
+
}
|
11
8
|
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
.mt#{$infix}-auto {
|
10
|
+
margin-top: auto !important;
|
11
|
+
}
|
15
12
|
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
.mr#{$infix}-auto {
|
14
|
+
margin-right: auto !important;
|
15
|
+
}
|
19
16
|
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
.mb#{$infix}-auto {
|
18
|
+
margin-bottom: auto !important;
|
19
|
+
}
|
23
20
|
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
.ml#{$infix}-auto {
|
22
|
+
margin-left: auto !important;
|
23
|
+
}
|
27
24
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
.mx#{$infix}-auto {
|
26
|
+
margin-right: auto !important;
|
27
|
+
margin-left: auto !important;
|
28
|
+
}
|
32
29
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
30
|
+
.my#{$infix}-auto {
|
31
|
+
margin-top: auto !important;
|
32
|
+
margin-bottom: auto !important;
|
33
|
+
}
|
37
34
|
|
38
|
-
|
39
|
-
|
40
|
-
$length-x: map-get($values, x);
|
41
|
-
$length-y: map-get($values, y);
|
35
|
+
@each $prop, $prop-abbr in (margin: m, padding: p) {
|
36
|
+
@each $size, $value in $spacers {
|
42
37
|
|
43
|
-
|
44
|
-
|
45
|
-
|
38
|
+
.#{$prop-abbr}#{$infix}-#{$size} {
|
39
|
+
#{$prop}: $value !important;
|
40
|
+
}
|
46
41
|
|
47
|
-
|
48
|
-
|
49
|
-
|
42
|
+
.#{$prop-abbr}t#{$infix}-#{$size} {
|
43
|
+
#{$prop}-top: $value !important;
|
44
|
+
}
|
50
45
|
|
51
|
-
|
52
|
-
|
53
|
-
|
46
|
+
.#{$prop-abbr}r#{$infix}-#{$size} {
|
47
|
+
#{$prop}-right: $value !important;
|
48
|
+
}
|
54
49
|
|
55
|
-
|
56
|
-
|
57
|
-
|
50
|
+
.#{$prop-abbr}b#{$infix}-#{$size} {
|
51
|
+
#{$prop}-bottom: $value !important;
|
52
|
+
}
|
58
53
|
|
59
|
-
|
60
|
-
|
61
|
-
|
54
|
+
.#{$prop-abbr}l#{$infix}-#{$size} {
|
55
|
+
#{$prop}-left: $value !important;
|
56
|
+
}
|
62
57
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
58
|
+
.#{$prop-abbr}x#{$infix}-#{$size} {
|
59
|
+
#{$prop}-right: $value !important;
|
60
|
+
#{$prop}-left: $value !important;
|
61
|
+
}
|
67
62
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
}
|
63
|
+
.#{$prop-abbr}y#{$infix}-#{$size} {
|
64
|
+
#{$prop}-top: $value !important;
|
65
|
+
#{$prop}-bottom: $value !important;
|
72
66
|
}
|
73
67
|
}
|
74
68
|
}
|
75
69
|
}
|
70
|
+
}
|
@@ -1,97 +1,102 @@
|
|
1
|
-
//
|
2
|
-
.text-justify {
|
3
|
-
text-align: justify !important;
|
4
|
-
}
|
1
|
+
// Alignment
|
5
2
|
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
.text-justify {
|
4
|
+
text-align: justify !important;
|
5
|
+
}
|
9
6
|
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
.text-nowrap {
|
8
|
+
white-space: nowrap !important;
|
9
|
+
}
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
$infix: breakpoint-infix($breakpoint);
|
11
|
+
.text-truncate {
|
12
|
+
@include text-truncate;
|
13
|
+
}
|
18
14
|
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
// Responsive alignment
|
16
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
17
|
+
@include media-breakpoint-up($breakpoint) {
|
18
|
+
$infix: breakpoint-infix($breakpoint);
|
22
19
|
|
23
|
-
|
24
|
-
|
25
|
-
|
20
|
+
.text#{$infix}-center {
|
21
|
+
text-align: center !important;
|
22
|
+
}
|
26
23
|
|
27
|
-
|
28
|
-
|
29
|
-
}
|
30
|
-
}
|
24
|
+
.text#{$infix}-left {
|
25
|
+
text-align: left !important;
|
31
26
|
}
|
32
27
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
@include text-emphasis-variant('.text-black-hint', $black-hint);
|
39
|
-
@include text-emphasis-variant('.text-black-divider', $black-divider);
|
28
|
+
.text#{$infix}-right {
|
29
|
+
text-align: right !important;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
40
33
|
|
41
|
-
@include text-emphasis-variant('.text-white', $white);
|
42
|
-
@include text-emphasis-variant('.text-white-primary', $white-primary);
|
43
|
-
@include text-emphasis-variant('.text-white-secondary', $white-secondary);
|
44
|
-
@include text-emphasis-variant('.text-white-hint', $white-hint);
|
45
|
-
@include text-emphasis-variant('.text-white-divider', $white-divider);
|
46
34
|
|
47
|
-
// font colour
|
48
|
-
@include text-emphasis-variant('.text-gray-dark', $black-primary, $black);
|
49
35
|
|
50
|
-
|
51
|
-
@include text-emphasis-variant('.text-muted', $text-muted, $text-muted-active);
|
36
|
+
// Color
|
52
37
|
|
53
|
-
|
54
|
-
|
55
|
-
|
38
|
+
// Black and white
|
39
|
+
@include text-emphasis-variant('.text-black', $black);
|
40
|
+
@include text-emphasis-variant('.text-black-primary', $black-primary);
|
41
|
+
@include text-emphasis-variant('.text-black-secondary', $black-secondary);
|
42
|
+
@include text-emphasis-variant('.text-black-hint', $black-hint);
|
43
|
+
@include text-emphasis-variant('.text-black-divider', $black-divider);
|
56
44
|
|
57
|
-
|
58
|
-
|
45
|
+
@include text-emphasis-variant('.text-white', $white);
|
46
|
+
@include text-emphasis-variant('.text-white-primary', $white-primary);
|
47
|
+
@include text-emphasis-variant('.text-white-secondary', $white-secondary);
|
48
|
+
@include text-emphasis-variant('.text-white-hint', $white-hint);
|
49
|
+
@include text-emphasis-variant('.text-white-divider', $white-divider);
|
59
50
|
|
60
|
-
|
51
|
+
@include text-emphasis-variant('.text-muted', $text-muted);
|
61
52
|
|
62
|
-
//
|
63
|
-
|
64
|
-
|
65
|
-
|
53
|
+
// Palette
|
54
|
+
@each $color, $values in $theme-colors {
|
55
|
+
@include text-emphasis-variant('.text-#{$color}', map-get(theme-color($color), color), map-get(theme-color($color), darker));
|
56
|
+
}
|
66
57
|
|
67
|
-
.font-weight-bold,
|
68
|
-
.font-weight-medium {
|
69
|
-
font-weight: $font-weight-medium;
|
70
|
-
}
|
71
58
|
|
72
|
-
.font-weight-light {
|
73
|
-
font-weight: $font-weight-light;
|
74
|
-
}
|
75
59
|
|
76
|
-
|
77
|
-
.font-weight-regular {
|
78
|
-
font-weight: $font-weight-regular;
|
79
|
-
}
|
60
|
+
// Italcs and weight
|
80
61
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
}
|
62
|
+
.font-italic {
|
63
|
+
font-style: italic;
|
64
|
+
}
|
85
65
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
66
|
+
.font-weight-bold,
|
67
|
+
.font-weight-medium {
|
68
|
+
font-weight: $font-weight-medium;
|
69
|
+
}
|
90
70
|
|
91
|
-
|
92
|
-
|
93
|
-
|
71
|
+
.font-weight-light {
|
72
|
+
font-weight: $font-weight-light;
|
73
|
+
}
|
94
74
|
|
95
|
-
|
96
|
-
|
97
|
-
|
75
|
+
.font-weight-normal,
|
76
|
+
.font-weight-regular {
|
77
|
+
font-weight: $font-weight-regular;
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
// Misc
|
83
|
+
|
84
|
+
.text-hide {
|
85
|
+
@include text-hide;
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
// Transformation
|
91
|
+
|
92
|
+
.text-capitalize {
|
93
|
+
text-transform: capitalize !important;
|
94
|
+
}
|
95
|
+
|
96
|
+
.text-lowercase {
|
97
|
+
text-transform: lowercase !important;
|
98
|
+
}
|
99
|
+
|
100
|
+
.text-uppercase {
|
101
|
+
text-transform: uppercase !important;
|
102
|
+
}
|
@@ -1,50 +1,9 @@
|
|
1
|
+
// Utilities for common `visibility` values
|
2
|
+
|
1
3
|
.invisible {
|
2
4
|
visibility: hidden !important;
|
3
5
|
}
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
.hidden-print {
|
9
|
-
@media print {
|
10
|
-
display: none !important;
|
11
|
-
}
|
12
|
-
}
|
13
|
-
|
14
|
-
.visible-print-block {
|
15
|
-
display: none !important;
|
16
|
-
@media print {
|
17
|
-
display: block !important;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
.visible-print-inline {
|
22
|
-
display: none !important;
|
23
|
-
@media print {
|
24
|
-
display: inline !important;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
.visible-print-inline-block {
|
29
|
-
display: none !important;
|
30
|
-
@media print {
|
31
|
-
display: inline-block !important;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
//
|
36
|
-
// responsive
|
37
|
-
//
|
38
|
-
@each $breakpoint in map-keys($grid-breakpoints) {
|
39
|
-
.hidden-#{$breakpoint}-up {
|
40
|
-
@include media-breakpoint-up($breakpoint) {
|
41
|
-
display: none !important;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
.hidden-#{$breakpoint}-down {
|
46
|
-
@include media-breakpoint-down($breakpoint) {
|
47
|
-
display: none !important;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
7
|
+
.visible {
|
8
|
+
visibility: visible !important;
|
9
|
+
}
|
@@ -1,12 +1,10 @@
|
|
1
|
-
/*
|
2
|
-
* waves v0.7.4
|
3
|
-
* http://fian.my.id/Waves
|
4
|
-
*/
|
5
|
-
|
6
1
|
.waves-effect {
|
7
2
|
position: relative;
|
8
3
|
-webkit-tap-highlight-color: transparent;
|
4
|
+
|
9
5
|
.waves-ripple {
|
6
|
+
@include transition-standard(opacity, transform);
|
7
|
+
|
10
8
|
background-clip: content-box;
|
11
9
|
background-color: $waves-bg;
|
12
10
|
border-radius: 50%;
|
@@ -17,8 +15,8 @@
|
|
17
15
|
position: absolute;
|
18
16
|
transform: scale(0) translate(0, 0);
|
19
17
|
width: $waves-size;
|
20
|
-
@include transition-standard(opacity, transform);
|
21
18
|
}
|
19
|
+
|
22
20
|
&.waves-light .waves-ripple {
|
23
21
|
background-color: $waves-bg-light;
|
24
22
|
}
|
@@ -28,21 +26,16 @@
|
|
28
26
|
overflow: hidden;
|
29
27
|
pointer-events: none;
|
30
28
|
position: absolute;
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
top: 0;
|
30
|
+
right: 0;
|
31
|
+
bottom: 0;
|
32
|
+
left: 0;
|
35
33
|
user-select: none;
|
34
|
+
|
36
35
|
.waves-circle > & {
|
37
36
|
border-radius: 50%;
|
38
|
-
|
39
|
-
|
40
|
-
// the fake mask fixes an issue in Firefox
|
41
|
-
// it replaces `mask: url()` in previous versions
|
42
|
-
// because `url()` may cause issues with some build tools
|
43
|
-
mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle fill='none' r='0' stroke-width='0' /%3E%3C/svg%3E");
|
44
|
-
|
37
|
+
mask: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle fill="none" r="0" stroke-width="0" /%3E%3C/svg%3E');
|
38
|
+
mask-image: radial-gradient(circle, $white 100%, $black 100%);
|
45
39
|
transform: translateZ(0);
|
46
|
-
-webkit-mask-image: -webkit-radial-gradient(circle, #ffffff 100%, #000000 100%);
|
47
40
|
}
|
48
41
|
}
|
@@ -1,84 +1,91 @@
|
|
1
|
-
//
|
2
|
-
// elevation
|
3
|
-
// based on https://material.google.com/what-is-material/elevation-shadows.html#elevation-shadows-elevation-android-
|
4
|
-
//
|
5
|
-
//
|
6
|
-
$elevation-24dp: 24 * 10 !default;
|
7
|
-
$elevation-16dp: 16 * 10 !default;
|
8
|
-
$elevation-12dp: 12 * 10 !default;
|
9
|
-
$elevation-8dp: 8 * 10 !default;
|
10
|
-
$elevation-6dp: 6 * 10 !default;
|
11
|
-
$elevation-4dp: 4 * 10 !default;
|
12
|
-
$elevation-3dp: 3 * 10 !default;
|
13
|
-
$elevation-2dp: 2 * 10 !default;
|
14
|
-
$elevation-1dp: 1 * 10 !default;
|
1
|
+
// Elevation
|
2
|
+
// Based on https://material.google.com/what-is-material/elevation-shadows.html#elevation-shadows-elevation-android-
|
15
3
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
0 8px 10px -5px rgba(0, 0, 0, 0.4) !default;
|
26
|
-
$shadow-12dp: 0 12px 16px 1px rgba(0, 0, 0, 0.14),
|
27
|
-
0 4px 22px 3px rgba(0, 0, 0, 0.12),
|
28
|
-
0 6px 7px -4px rgba(0, 0, 0, 0.4) !default;
|
29
|
-
$shadow-8dp: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
30
|
-
0 3px 14px 2px rgba(0, 0, 0, 0.12),
|
31
|
-
0 5px 5px -3px rgba(0, 0, 0, 0.4) !default;
|
32
|
-
$shadow-6dp: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
|
33
|
-
0 1px 18px 0 rgba(0, 0, 0, 0.12),
|
34
|
-
0 3px 5px -1px rgba(0, 0, 0, 0.4) !default;
|
35
|
-
$shadow-4dp: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
|
36
|
-
0 1px 10px 0 rgba(0, 0, 0, 0.12),
|
37
|
-
0 2px 4px -1px rgba(0, 0, 0, 0.4) !default;
|
38
|
-
$shadow-3dp: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
|
39
|
-
0 1px 8px 0 rgba(0, 0, 0, 0.12),
|
40
|
-
0 3px 3px -2px rgba(0, 0, 0, 0.4) !default;
|
41
|
-
$shadow-2dp: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
42
|
-
0 1px 5px 0 rgba(0, 0, 0, 0.12),
|
43
|
-
0 3px 1px -2px rgba(0, 0, 0, 0.2) !default;
|
44
|
-
$shadow-1dp: none !default;
|
4
|
+
$elevation-24dp: 24 * 10 !default;
|
5
|
+
$elevation-16dp: 16 * 10 !default;
|
6
|
+
$elevation-12dp: 12 * 10 !default;
|
7
|
+
$elevation-8dp: 8 * 10 !default;
|
8
|
+
$elevation-6dp: 6 * 10 !default;
|
9
|
+
$elevation-4dp: 4 * 10 !default;
|
10
|
+
$elevation-3dp: 3 * 10 !default;
|
11
|
+
$elevation-2dp: 2 * 10 !default;
|
12
|
+
$elevation-1dp: 1 * 10 !default;
|
45
13
|
|
46
|
-
|
47
|
-
|
48
|
-
//
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
14
|
+
|
15
|
+
|
16
|
+
// Shadow
|
17
|
+
// Based on https://material.google.com/what-is-material/elevation-shadows.html#elevation-shadows-shadows
|
18
|
+
|
19
|
+
$shadow-color-1: rgba(0, 0, 0, .14) !default;
|
20
|
+
$shadow-color-2: rgba(0, 0, 0, .12) !default;
|
21
|
+
$shadow-color-3: rgba(0, 0, 0, .2) !default;
|
22
|
+
|
23
|
+
$shadow-24dp: 0 24px 38px 3px $shadow-color-1,
|
24
|
+
0 9px 46px 8px $shadow-color-2,
|
25
|
+
0 11px 15px 0 $shadow-color-3 !default;
|
26
|
+
$shadow-16dp: 0 16px 24px 2px $shadow-color-1,
|
27
|
+
0 6px 30px 5px $shadow-color-2,
|
28
|
+
0 8px 10px 0 $shadow-color-3 !default;
|
29
|
+
$shadow-12dp: 0 12px 17px 2px $shadow-color-1,
|
30
|
+
0 5px 22px 4px $shadow-color-2,
|
31
|
+
0 7px 8px 0 $shadow-color-3 !default;
|
32
|
+
$shadow-8dp: 0 8px 10px 1px $shadow-color-1,
|
33
|
+
0 3px 14px 3px $shadow-color-2,
|
34
|
+
0 4px 15px 0 $shadow-color-3 !default;
|
35
|
+
$shadow-6dp: 0 6px 10px 0 $shadow-color-1,
|
36
|
+
0 1px 18px 0 $shadow-color-2,
|
37
|
+
0 3px 5px 0 $shadow-color-3 !default;
|
38
|
+
$shadow-4dp: 0 2px 4px 0 $shadow-color-1,
|
39
|
+
0 4px 5px 0 $shadow-color-2,
|
40
|
+
0 1px 10px 0 $shadow-color-3 !default;
|
41
|
+
$shadow-3dp: 0 3px 3px 0 $shadow-color-1,
|
42
|
+
0 3px 4px 0 $shadow-color-2,
|
43
|
+
0 1px 8px 0 $shadow-color-3 !default;
|
44
|
+
$shadow-2dp: 0 0 4px 0 $shadow-color-1,
|
45
|
+
0 3px 4px 0 $shadow-color-2,
|
46
|
+
0 1px 5px 0 $shadow-color-3 !default;
|
47
|
+
$shadow-1dp: 0 0 2px 0 $shadow-color-1,
|
48
|
+
0 2px 2px 0 $shadow-color-2,
|
49
|
+
0 1px 3px 0 $shadow-color-3 !default;
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
// Value pair
|
54
|
+
// Combination of elevation and shadow
|
55
|
+
|
56
|
+
$elevation-shadow-24dp: (
|
57
|
+
elevation: $elevation-24dp,
|
58
|
+
shadow: $shadow-24dp
|
59
|
+
) !default;
|
60
|
+
$elevation-shadow-16dp: (
|
61
|
+
elevation: $elevation-16dp,
|
62
|
+
shadow: $shadow-16dp
|
63
|
+
) !default;
|
64
|
+
$elevation-shadow-12dp: (
|
65
|
+
elevation: $elevation-12dp,
|
66
|
+
shadow: $shadow-12dp
|
67
|
+
) !default;
|
68
|
+
$elevation-shadow-8dp: (
|
69
|
+
elevation: $elevation-8dp,
|
70
|
+
shadow: $shadow-8dp
|
71
|
+
) !default;
|
72
|
+
$elevation-shadow-6dp: (
|
73
|
+
elevation: $elevation-6dp,
|
74
|
+
shadow: $shadow-6dp
|
75
|
+
) !default;
|
76
|
+
$elevation-shadow-4dp: (
|
77
|
+
elevation: $elevation-4dp,
|
78
|
+
shadow: $shadow-4dp
|
79
|
+
) !default;
|
80
|
+
$elevation-shadow-3dp: (
|
81
|
+
elevation: $elevation-3dp,
|
82
|
+
shadow: $shadow-3dp
|
83
|
+
) !default;
|
84
|
+
$elevation-shadow-2dp: (
|
85
|
+
elevation: $elevation-2dp,
|
86
|
+
shadow: $shadow-2dp
|
87
|
+
) !default;
|
88
|
+
$elevation-shadow-1dp: (
|
89
|
+
elevation: $elevation-1dp,
|
90
|
+
shadow: $shadow-1dp
|
91
|
+
) !default;
|