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.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +36 -8
  4. data/Rakefile +16 -3
  5. data/app/assets/javascripts/material-sprockets.js +6 -1
  6. data/app/assets/javascripts/material.js +654 -417
  7. data/app/assets/javascripts/material.min.js +1 -0
  8. data/app/assets/javascripts/material/addons/picker.date.js +234 -0
  9. data/app/assets/javascripts/material/addons/picker.js +172 -0
  10. data/app/assets/javascripts/material/addons/textarea-autosize.js +20 -2
  11. data/app/assets/javascripts/material/addons/waves.js +127 -0
  12. data/app/assets/javascripts/material/components/floating-label.js +92 -0
  13. data/app/assets/javascripts/material/components/navdrawer.js +353 -0
  14. data/app/assets/javascripts/material/components/selection-control-focus.js +47 -0
  15. data/app/assets/javascripts/material/components/tab-switch.js +148 -0
  16. data/app/assets/javascripts/material/components/util.js +133 -0
  17. data/app/assets/javascripts/material/initializers/picker.js +171 -0
  18. data/app/assets/javascripts/material/initializers/textarea-autosize.js +10 -0
  19. data/app/assets/javascripts/material/initializers/waves.js +13 -0
  20. data/app/assets/stylesheets/material/_colours.scss +324 -0
  21. data/app/assets/stylesheets/material/_functions.scss +65 -0
  22. data/app/assets/stylesheets/material/_mixins.scss +23 -23
  23. data/app/assets/stylesheets/material/_print.scss +102 -0
  24. data/app/assets/stylesheets/material/_utilities.scss +21 -17
  25. data/app/assets/stylesheets/material/_variables.scss +13 -42
  26. data/app/assets/stylesheets/material/base/_base.scss +420 -5
  27. data/app/assets/stylesheets/material/base/_grid.scss +34 -33
  28. data/app/assets/stylesheets/material/base/_typography.scss +165 -174
  29. data/app/assets/stylesheets/material/bootstrap/_alert.scss +32 -39
  30. data/app/assets/stylesheets/material/bootstrap/_badge.scss +34 -0
  31. data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +18 -18
  32. data/app/assets/stylesheets/material/bootstrap/_carousel.scss +127 -142
  33. data/app/assets/stylesheets/material/bootstrap/_close.scss +18 -19
  34. data/app/assets/stylesheets/material/bootstrap/_code.scss +10 -7
  35. data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +50 -56
  36. data/app/assets/stylesheets/material/bootstrap/_form.scss +159 -129
  37. data/app/assets/stylesheets/material/bootstrap/_image.scss +19 -16
  38. data/app/assets/stylesheets/material/bootstrap/_jumbotron.scss +10 -7
  39. data/app/assets/stylesheets/material/bootstrap/_nav.scss +71 -69
  40. data/app/assets/stylesheets/material/bootstrap/_pagination.scss +34 -26
  41. data/app/assets/stylesheets/material/bootstrap/_popover.scss +26 -59
  42. data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +4 -4
  43. data/app/assets/stylesheets/material/bootstrap/_transition.scss +10 -8
  44. data/app/assets/stylesheets/material/material.scss +75 -62
  45. data/app/assets/stylesheets/material/material/_button-flat.scss +26 -39
  46. data/app/assets/stylesheets/material/material/_button-float.scss +10 -14
  47. data/app/assets/stylesheets/material/material/_button-group.scss +268 -0
  48. data/app/assets/stylesheets/material/material/_button.scss +133 -189
  49. data/app/assets/stylesheets/material/material/_card.scss +300 -248
  50. data/app/assets/stylesheets/material/material/_chip.scss +65 -64
  51. data/app/assets/stylesheets/material/material/_data-table.scss +135 -45
  52. data/app/assets/stylesheets/material/material/_dialog.scss +141 -110
  53. data/app/assets/stylesheets/material/material/_expansion-panel.scss +86 -119
  54. data/app/assets/stylesheets/material/material/_menu.scss +308 -228
  55. data/app/assets/stylesheets/material/material/_navdrawer.scss +239 -234
  56. data/app/assets/stylesheets/material/material/_picker.scss +157 -155
  57. data/app/assets/stylesheets/material/material/_progress-circular.scss +80 -80
  58. data/app/assets/stylesheets/material/material/_progress.scss +180 -115
  59. data/app/assets/stylesheets/material/material/_selection-control.scss +132 -139
  60. data/app/assets/stylesheets/material/material/_stepper.scss +94 -93
  61. data/app/assets/stylesheets/material/material/_tab.scss +74 -93
  62. data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +29 -20
  63. data/app/assets/stylesheets/material/material/_text-field-input-group.scss +94 -24
  64. data/app/assets/stylesheets/material/material/_text-field-textarea.scss +13 -26
  65. data/app/assets/stylesheets/material/material/_text-field.scss +127 -118
  66. data/app/assets/stylesheets/material/material/_toolbar.scss +308 -313
  67. data/app/assets/stylesheets/material/material/_tooltip.scss +23 -62
  68. data/app/assets/stylesheets/material/mixins/_background-variant.scss +6 -6
  69. data/app/assets/stylesheets/material/mixins/_border-radius.scss +17 -17
  70. data/app/assets/stylesheets/material/mixins/_breakpoint.scss +32 -2
  71. data/app/assets/stylesheets/material/mixins/_clearfix.scss +1 -1
  72. data/app/assets/stylesheets/material/mixins/_form.scss +62 -25
  73. data/app/assets/stylesheets/material/mixins/_grid-framework.scss +8 -16
  74. data/app/assets/stylesheets/material/mixins/_grid.scss +40 -64
  75. data/app/assets/stylesheets/material/mixins/_material-icons.scss +36 -0
  76. data/app/assets/stylesheets/material/mixins/_nav-divider.scss +1 -1
  77. data/app/assets/stylesheets/material/mixins/_reset-text.scss +2 -21
  78. data/app/assets/stylesheets/material/mixins/_screenreader.scss +14 -12
  79. data/app/assets/stylesheets/material/mixins/_text-alignment.scss +23 -0
  80. data/app/assets/stylesheets/material/mixins/_text-emphasis.scss +6 -6
  81. data/app/assets/stylesheets/material/mixins/_transition.scss +42 -10
  82. data/app/assets/stylesheets/material/utilities/_background.scss +18 -18
  83. data/app/assets/stylesheets/material/utilities/_border.scss +88 -41
  84. data/app/assets/stylesheets/material/utilities/_display.scss +63 -30
  85. data/app/assets/stylesheets/material/utilities/_flex.scss +139 -134
  86. data/app/assets/stylesheets/material/utilities/_material-icons.scss +3 -5
  87. data/app/assets/stylesheets/material/utilities/_position.scss +19 -22
  88. data/app/assets/stylesheets/material/utilities/_sizing.scss +11 -12
  89. data/app/assets/stylesheets/material/utilities/_spacing.scss +51 -56
  90. data/app/assets/stylesheets/material/utilities/_text.scss +80 -75
  91. data/app/assets/stylesheets/material/utilities/_visibility.scss +5 -46
  92. data/app/assets/stylesheets/material/utilities/_waves.scss +11 -18
  93. data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +89 -82
  94. data/app/assets/stylesheets/material/variables/_grid.scss +29 -26
  95. data/app/assets/stylesheets/material/variables/_palette.scss +45 -0
  96. data/app/assets/stylesheets/material/variables/_spacer.scss +34 -88
  97. data/app/assets/stylesheets/material/variables/_transition.scss +29 -0
  98. data/app/assets/stylesheets/material/variables/_typography.scss +88 -74
  99. data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +196 -133
  100. data/app/assets/stylesheets/material/variables/_variable-material.scss +481 -429
  101. data/lib/material-sass/version.rb +1 -1
  102. data/material-sass.gemspec +3 -3
  103. metadata +26 -21
  104. data/app/assets/javascripts/material/addons-materialise/pickadate.js +0 -139
  105. data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +0 -11
  106. data/app/assets/javascripts/material/addons-materialise/wave.js +0 -15
  107. data/app/assets/javascripts/material/addons/pickadate.js +0 -7
  108. data/app/assets/javascripts/material/addons/wave.js +0 -5
  109. data/app/assets/javascripts/material/src/floating-label.js +0 -91
  110. data/app/assets/javascripts/material/src/navdrawer.js +0 -352
  111. data/app/assets/javascripts/material/src/tab-switch.js +0 -133
  112. data/app/assets/javascripts/material/src/util.js +0 -138
  113. data/app/assets/stylesheets/material/base/_normalize.scss +0 -253
  114. data/app/assets/stylesheets/material/base/_reboot.scss +0 -239
  115. data/app/assets/stylesheets/material/bootstrap/_button-group.scss +0 -134
  116. data/app/assets/stylesheets/material/mixins/_tab-focus.scss +0 -5
  117. data/app/assets/stylesheets/material/mixins/_transform.scss +0 -9
  118. data/app/assets/stylesheets/material/variables/_animation.scss +0 -22
  119. data/app/assets/stylesheets/material/variables/_colour.scss +0 -389
@@ -1,75 +1,70 @@
1
- //
2
- // margin and padding
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
- .m#{$infix}-auto {
9
- margin: auto !important;
10
- }
5
+ .m#{$infix}-auto {
6
+ margin: auto !important;
7
+ }
11
8
 
12
- .mt#{$infix}-auto {
13
- margin-top: auto !important;
14
- }
9
+ .mt#{$infix}-auto {
10
+ margin-top: auto !important;
11
+ }
15
12
 
16
- .mr#{$infix}-auto {
17
- margin-right: auto !important;
18
- }
13
+ .mr#{$infix}-auto {
14
+ margin-right: auto !important;
15
+ }
19
16
 
20
- .mb#{$infix}-auto {
21
- margin-bottom: auto !important;
22
- }
17
+ .mb#{$infix}-auto {
18
+ margin-bottom: auto !important;
19
+ }
23
20
 
24
- .ml#{$infix}-auto {
25
- margin-left: auto !important;
26
- }
21
+ .ml#{$infix}-auto {
22
+ margin-left: auto !important;
23
+ }
27
24
 
28
- .mx#{$infix}-auto {
29
- margin-right: auto !important;
30
- margin-left: auto !important;
31
- }
25
+ .mx#{$infix}-auto {
26
+ margin-right: auto !important;
27
+ margin-left: auto !important;
28
+ }
32
29
 
33
- .my#{$infix}-auto {
34
- margin-top: auto !important;
35
- margin-bottom: auto !important;
36
- }
30
+ .my#{$infix}-auto {
31
+ margin-top: auto !important;
32
+ margin-bottom: auto !important;
33
+ }
37
34
 
38
- @each $prop, $prop-abbr in (margin: m, padding: p) {
39
- @each $size, $values in $spacers {
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
- .#{$prop-abbr}#{$infix}-#{$size} {
44
- #{$prop}: $length-y $length-x !important;
45
- }
38
+ .#{$prop-abbr}#{$infix}-#{$size} {
39
+ #{$prop}: $value !important;
40
+ }
46
41
 
47
- .#{$prop-abbr}t#{$infix}-#{$size} {
48
- #{$prop}-top: $length-y !important;
49
- }
42
+ .#{$prop-abbr}t#{$infix}-#{$size} {
43
+ #{$prop}-top: $value !important;
44
+ }
50
45
 
51
- .#{$prop-abbr}r#{$infix}-#{$size} {
52
- #{$prop}-right: $length-x !important;
53
- }
46
+ .#{$prop-abbr}r#{$infix}-#{$size} {
47
+ #{$prop}-right: $value !important;
48
+ }
54
49
 
55
- .#{$prop-abbr}b#{$infix}-#{$size} {
56
- #{$prop}-bottom: $length-y !important;
57
- }
50
+ .#{$prop-abbr}b#{$infix}-#{$size} {
51
+ #{$prop}-bottom: $value !important;
52
+ }
58
53
 
59
- .#{$prop-abbr}l#{$infix}-#{$size} {
60
- #{$prop}-left: $length-x !important;
61
- }
54
+ .#{$prop-abbr}l#{$infix}-#{$size} {
55
+ #{$prop}-left: $value !important;
56
+ }
62
57
 
63
- .#{$prop-abbr}x#{$infix}-#{$size} {
64
- #{$prop}-right: $length-x !important;
65
- #{$prop}-left: $length-x !important;
66
- }
58
+ .#{$prop-abbr}x#{$infix}-#{$size} {
59
+ #{$prop}-right: $value !important;
60
+ #{$prop}-left: $value !important;
61
+ }
67
62
 
68
- .#{$prop-abbr}y#{$infix}-#{$size} {
69
- #{$prop}-top: $length-y !important;
70
- #{$prop}-bottom: $length-y !important;
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
- // alignment
2
- .text-justify {
3
- text-align: justify !important;
4
- }
1
+ // Alignment
5
2
 
6
- .text-nowrap {
7
- white-space: nowrap !important;
8
- }
3
+ .text-justify {
4
+ text-align: justify !important;
5
+ }
9
6
 
10
- .text-truncate {
11
- @include text-truncate;
12
- }
7
+ .text-nowrap {
8
+ white-space: nowrap !important;
9
+ }
13
10
 
14
- // horizontal
15
- @each $breakpoint in map-keys($grid-breakpoints) {
16
- @include media-breakpoint-up($breakpoint) {
17
- $infix: breakpoint-infix($breakpoint);
11
+ .text-truncate {
12
+ @include text-truncate;
13
+ }
18
14
 
19
- .text#{$infix}-center {
20
- text-align: center !important;
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
- .text#{$infix}-left {
24
- text-align: left !important;
25
- }
20
+ .text#{$infix}-center {
21
+ text-align: center !important;
22
+ }
26
23
 
27
- .text#{$infix}-right {
28
- text-align: right !important;
29
- }
30
- }
24
+ .text#{$infix}-left {
25
+ text-align: left !important;
31
26
  }
32
27
 
33
- // color
34
- // black and white
35
- @include text-emphasis-variant('.text-black', $black);
36
- @include text-emphasis-variant('.text-black-primary', $black-primary);
37
- @include text-emphasis-variant('.text-black-secondary', $black-secondary);
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
- // offwhite
51
- @include text-emphasis-variant('.text-muted', $text-muted, $text-muted-active);
36
+ // Color
52
37
 
53
- // palette
54
- @each $color in $palettes {
55
- $i: index($palettes, $color);
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
- @include text-emphasis-variant('.text-#{$color}', nth($palettes-color, $i), nth($palettes-color-dark, $i));
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
- @include text-emphasis-variant('.text-inverse', $white-primary, $white);
51
+ @include text-emphasis-variant('.text-muted', $text-muted);
61
52
 
62
- // italcs and weight
63
- .font-italic {
64
- font-style: italic;
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
- .font-weight-normal,
77
- .font-weight-regular {
78
- font-weight: $font-weight-regular;
79
- }
60
+ // Italcs and weight
80
61
 
81
- // misc
82
- .text-hide {
83
- @include text-hide;
84
- }
62
+ .font-italic {
63
+ font-style: italic;
64
+ }
85
65
 
86
- // transformation
87
- .text-capitalize {
88
- text-transform: capitalize !important;
89
- }
66
+ .font-weight-bold,
67
+ .font-weight-medium {
68
+ font-weight: $font-weight-medium;
69
+ }
90
70
 
91
- .text-lowercase {
92
- text-transform: lowercase !important;
93
- }
71
+ .font-weight-light {
72
+ font-weight: $font-weight-light;
73
+ }
94
74
 
95
- .text-uppercase {
96
- text-transform: uppercase !important;
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
- // print
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
- top: 0;
32
- right: 0;
33
- bottom: 0;
34
- left: 0;
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
- // r='0' disables rendering of the element
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
- // shadow
18
- // based on https://material.google.com/what-is-material/elevation-shadows.html#elevation-shadows-shadows
19
- //
20
- $shadow-24dp: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
21
- 0 9px 46px 8px rgba(0, 0, 0, 0.12),
22
- 0 11px 15px -7px rgba(0, 0, 0, 0.4) !default;
23
- $shadow-16dp: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
24
- 0 6px 30px 5px rgba(0, 0, 0, 0.12),
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
- // value pair
48
- //
49
- $elevation-shadow-24dp: (
50
- elevation: $elevation-24dp,
51
- shadow: $shadow-24dp
52
- ) !default;
53
- $elevation-shadow-16dp: (
54
- elevation: $elevation-16dp,
55
- shadow: $shadow-16dp
56
- ) !default;
57
- $elevation-shadow-12dp: (
58
- elevation: $elevation-12dp,
59
- shadow: $shadow-12dp
60
- ) !default;
61
- $elevation-shadow-8dp: (
62
- elevation: $elevation-8dp,
63
- shadow: $shadow-8dp
64
- ) !default;
65
- $elevation-shadow-6dp: (
66
- elevation: $elevation-6dp,
67
- shadow: $shadow-6dp
68
- ) !default;
69
- $elevation-shadow-4dp: (
70
- elevation: $elevation-4dp,
71
- shadow: $shadow-4dp
72
- ) !default;
73
- $elevation-shadow-3dp: (
74
- elevation: $elevation-3dp,
75
- shadow: $shadow-3dp
76
- ) !default;
77
- $elevation-shadow-2dp: (
78
- elevation: $elevation-2dp,
79
- shadow: $shadow-2dp
80
- ) !default;
81
- $elevation-shadow-1dp: (
82
- elevation: $elevation-1dp,
83
- shadow: $shadow-1dp
84
- ) !default;
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;