6
6
@import ' ~@react-md/divider/dist/variables' ;
7
7
@import ' ~@react-md/theme/dist/functions' ;
8
8
9
+ /// The elevation to use for cards that are not raisable.
10
+ /// @type Number
11
+ $rmd-card-elevation : 2 !default ;
12
+
13
+ /// The background color for a card in light themes.
14
+ ///
15
+ /// @type Color
16
+ /// @since 2.7.0
17
+ $rmd-card-light-background-color : rmd-theme-var (surface ) !default ;
18
+
19
+ /// The background color for a card in dark themes when the
20
+ /// `$rmd-theme-dark-elevation` feature flag is also enabled.
21
+ ///
22
+ /// @see $rmd-theme-dark-elevation
23
+ /// @require $rmd-theme-dark-elevation-colors
24
+ /// @type Color
25
+ /// @since 2.7.0
26
+ $rmd-card-dark-elevation-background-color : map-get (
27
+ $rmd-theme-dark-elevation-colors ,
28
+ $rmd-card-elevation
29
+ );
30
+
31
+ /// @type Color
32
+ /// @since 2.5.4
33
+ /// @deprecated Use `$rmd-card-dark-elevation-color` instead starting with `v2.7.0`
34
+ $rmd-card-dark-elevation-bordered-background-color : $rmd-card-dark-elevation-background-color ;
35
+
36
+ /// The background color for a card in dark themes.
37
+ ///
38
+ /// @type Color
39
+ /// @since 2.7.0
40
+ $rmd-card-dark-background-color : if (
41
+ $rmd-theme-dark-elevation and $rmd-card-dark-elevation-background-color ,
42
+ $rmd-card-dark-elevation-background-color ,
43
+ rmd-theme-var (surface )
44
+ ) !default ;
45
+
9
46
/// The base background color to apply to cards.
10
47
///
11
48
/// @require rmd-theme-var
12
49
/// @type Color
13
- $rmd-card-background-color : rmd-theme-var (surface ) !default ;
50
+ $rmd-card-background-color : if (
51
+ $rmd-theme-light ,
52
+ $rmd-card-light-background-color ,
53
+ $rmd-card-dark-background-color
54
+ ) !default ;
14
55
15
56
/// The base primary text color to apply to cards.
16
57
///
@@ -32,10 +73,6 @@ $rmd-card-secondary-color: if(
32
73
rmd-theme-var (text-primary-on-dark )
33
74
) !default ;
34
75
35
- /// The elevation to use for cards that are not raisable.
36
- /// @type Number
37
- $rmd-card-elevation : 2 !default ;
38
-
39
76
/// The starting elevation for a raisable card.
40
77
/// @type Number
41
78
$rmd-card-base-elevation : 1 !default ;
@@ -90,19 +127,6 @@ $rmd-card-border-color: rmd-divider-theme-var(background-color) !default;
90
127
/// @type Number
91
128
$rmd-card-border-width : $rmd-divider-size !default ;
92
129
93
- /// The background color to use for bordered cards when the
94
- /// `$rmd-theme-dark-elevation` variable is set to `true`. This basically
95
- /// overrides the `surface` color to be this value.
96
- ///
97
- /// @see $rmd-theme-dark-elevation
98
- /// @require $rmd-theme-dark-elevation-colors
99
- /// @type Color
100
- /// @since 2.5.4
101
- $rmd-card-dark-elevation-bordered-background-color : map-get (
102
- $rmd-theme-dark-elevation-colors ,
103
- $rmd-card-elevation
104
- );
105
-
106
130
/// A Map of all the "themeable" parts of the card package. Every key in this
107
131
/// map will be used to create a css variable to dynamically update the values
108
132
/// of the icon as needed.
0 commit comments