@@ -18,6 +18,11 @@ $rmd-snackbar-margin: 1rem !default;
18
18
/// @type Number
19
19
$rmd-snackbar-z-index : $rmd-utils-temporary-element-z-index + 10 !default ;
20
20
21
+ /// The elevation to add to a toast. This will be used to create the correct
22
+ /// box-shadow.
23
+ /// @type Number
24
+ $rmd-toast-elevation : 6 !default ;
25
+
21
26
/// The border radius to apply to a toast.
22
27
/// @type Number
23
28
$rmd-toast-border-radius : 0.25rem !default ;
@@ -32,9 +37,25 @@ $rmd-toast-light-background-color: #323232 !default;
32
37
/// @type Color
33
38
$rmd-toast-light-color : $rmd-white-base !default ;
34
39
40
+ /// The background color for a toast in dark themes when the
41
+ /// `$rmd-theme-dark-elevation` feature flag is also enabled.
42
+ ///
43
+ /// @see $rmd-theme-dark-elevation
44
+ /// @require $rmd-theme-dark-elevation-colors
45
+ /// @type Color
46
+ /// @since 2.7.0
47
+ $rmd-toast-dark-elevation-background-color : map-get (
48
+ $rmd-theme-dark-elevation-colors ,
49
+ $rmd-toast-elevation
50
+ ) !default ;
51
+
35
52
/// The background color for a toast in dark themes.
36
53
/// @type Color
37
- $rmd-toast-dark-background-color : $rmd-toast-light-background-color !default ;
54
+ $rmd-toast-dark-background-color : if (
55
+ $rmd-theme-dark-elevation and $rmd-toast-dark-elevation-background-color ,
56
+ $rmd-toast-dark-elevation-background-color ,
57
+ $rmd-toast-light-background-color
58
+ ) !default ;
38
59
39
60
/// The text color for a toast in dark themes
40
61
///
@@ -95,11 +116,6 @@ $rmd-toast-action-margin: 0.5rem !default;
95
116
/// @type Number
96
117
$rmd-toast-stacked-action-margin-top : 0.25rem !default ;
97
118
98
- /// The elevation to add to a toast. This will be used to create the correct
99
- /// box-shadow.
100
- /// @type Number
101
- $rmd-toast-elevation : 6 !default ;
102
-
103
119
/// The transition duration for the enter animation for a toast. If this value
104
120
/// gets updated, you'll also need to update the `timoout` prop on the `Toast`
105
121
/// as well.
0 commit comments