@@ -18,6 +18,11 @@ $rmd-snackbar-margin: 1rem !default;
1818/// @type Number
1919$rmd-snackbar-z-index : $rmd-utils-temporary-element-z-index + 10 !default ;
2020
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+
2126/// The border radius to apply to a toast.
2227/// @type Number
2328$rmd-toast-border-radius : 0.25rem !default ;
@@ -32,9 +37,25 @@ $rmd-toast-light-background-color: #323232 !default;
3237/// @type Color
3338$rmd-toast-light-color : $rmd-white-base !default ;
3439
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+
3552/// The background color for a toast in dark themes.
3653/// @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 ;
3859
3960/// The text color for a toast in dark themes
4061///
@@ -95,11 +116,6 @@ $rmd-toast-action-margin: 0.5rem !default;
95116/// @type Number
96117$rmd-toast-stacked-action-margin-top : 0.25rem !default ;
97118
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-
103119/// The transition duration for the enter animation for a toast. If this value
104120/// gets updated, you'll also need to update the `timoout` prop on the `Toast`
105121/// as well.
0 commit comments