@@ -52,6 +52,7 @@ governing permissions and limitations under the License.
52
52
--spectrum-card-actions-spacing : var (--spectrum-spacing-300 );
53
53
--spectrum-card-actions-size : var (--spectrum-card-selection-background-size );
54
54
--spectrum-card-actions-border-radius : var (--spectrum-corner-radius-100 );
55
+
55
56
/* TODO update to --spectrum-card-selection-background-color token once an RGB stripped value is available */
56
57
--spectrum-card-actions-background-color-rgb : var (--spectrum-gray-100-rgb );
57
58
--spectrum-card-actions-background-color-opacity : var (
@@ -70,14 +71,17 @@ governing permissions and limitations under the License.
70
71
71
72
/* Selected */
72
73
--spectrum-card-selected-background-opacity : 0.1 ; /* table-selected-row-background-opacity does not exist in tokens yet */
74
+
73
75
/* TODO: These are placeholder until recursive RGB is available */
74
76
.spectrum--light & ,
75
77
.spectrum--lightest & {
76
78
--spectrum-card-selected-background-color-rgb : var (--spectrum-blue-900-rgb );
77
79
}
80
+
78
81
.spectrum--dark & {
79
82
--spectrum-card-selected-background-color-rgb : var (--spectrum-blue-500-rgb );
80
83
}
84
+
81
85
.spectrum--darkest & {
82
86
--spectrum-card-selected-background-color-rgb : var (--spectrum-blue-600-rgb );
83
87
}
@@ -86,29 +90,18 @@ governing permissions and limitations under the License.
86
90
& --quiet ,
87
91
& --gallery {
88
92
--mod-card-content-margin-top : var (
89
- --spectrum -card-content-margin-top-quiet ,
93
+ --mod -card-content-margin-top-quiet ,
90
94
var (--spectrum-spacing-100 )
91
95
);
92
96
--mod-card-minimum-width : var (
93
- --spectrum -card-minimum-width-quiet ,
97
+ --mod -card-minimum-width-quiet ,
94
98
var (--spectrum-card-minimum-width )
95
99
);
96
-
97
- --spectrum-card-preview-border-width : var (--spectrum-border-width-100 );
98
100
}
99
101
100
- & --quiet ,
101
- & --gallery ,
102
- & --horizontal {
103
- --mod-card-background-color : var (
104
- --spectrum-card-background-color-quiet ,
105
- var (--spectrum-background-base-color )
106
- );
107
- --spectrum-card-background-color-hover : var (
108
- --spectrum-card-background-color-hover-quiet ,
109
- var (--spectrum-gray-300 )
110
- );
111
- }
102
+ --spectrum-card-preview-border-width-selected : var (--spectrum-border-width-100 );
103
+ --spectrum-card-preview-background-color : var (--spectrum-background-base-color );
104
+ --spectrum-card-preview-background-color-hover : var (--spectrum-gray-300 );
112
105
113
106
/* Horizontal */
114
107
--spectrum-card-horizontal-body-padding : var (--spectrum-spacing-300 );
@@ -137,11 +130,17 @@ governing permissions and limitations under the License.
137
130
--highcontrast-card-border-color ,
138
131
var (--mod-card-border-color , var (--spectrum-card-border-color ))
139
132
);
133
+
134
+ /* @deprecation --mod-spectrum-card-background-color has been renamed to
135
+ --mod-card-background-color. The fallback will be removed in a future version. */
140
136
background-color : var (
141
137
--highcontrast-card-background-color ,
142
138
var (
143
- --mod-spectrum-card-background-color ,
144
- var (--spectrum-card-background-color )
139
+ --mod-card-background-color ,
140
+ var (
141
+ --mod-spectrum-card-background-color ,
142
+ var (--spectrum-card-background-color )
143
+ )
145
144
)
146
145
);
147
146
@@ -245,6 +244,7 @@ governing permissions and limitations under the License.
245
244
var (--spectrum-card-border-color-selected )
246
245
)
247
246
);
247
+
248
248
& ::before {
249
249
background-color : rgba (
250
250
var (
@@ -294,7 +294,7 @@ governing permissions and limitations under the License.
294
294
.spectrum-Card-actions {
295
295
/* Ideally, this would simply apply is-open to the QuickActions component */
296
296
visibility : visible;
297
- opacity : 1 ;
297
+ opacity : 100 % ;
298
298
pointer-events : all;
299
299
}
300
300
}
@@ -570,6 +570,7 @@ governing permissions and limitations under the License.
570
570
var (--mod-card-border-width , var (--spectrum-card-border-width ))
571
571
)
572
572
);
573
+
573
574
/* @deprecation --mod-card-footer-margin-top has been renamed to --mod-card-footer-padding-block-start
574
575
and will be removed in a future version. */
575
576
padding-block-start : var (
@@ -623,6 +624,7 @@ governing permissions and limitations under the License.
623
624
& ::after {
624
625
border-width : 0 ;
625
626
}
627
+
626
628
.spectrum-Card-preview ::after {
627
629
border-color : var (
628
630
--mod-card-focus-indicator-color ,
@@ -633,9 +635,14 @@ governing permissions and limitations under the License.
633
635
634
636
& .is-selected {
635
637
.spectrum-Card-preview {
638
+ /* @deprecation --mod-card-preview-border-width has been renamed to --mod-card-preview-border-width-selected
639
+ and the fallback will be removed in a future version. */
636
640
border : var (
637
- --mod-card-preview-border-width ,
638
- var (--spectrum-card-preview-border-width )
641
+ --mod-card-preview-border-width-selected ,
642
+ var (
643
+ --mod-card-preview-border-width ,
644
+ var (--spectrum-card-preview-border-width-selected )
645
+ )
639
646
)
640
647
solid;
641
648
border-color : var (
@@ -672,8 +679,11 @@ governing permissions and limitations under the License.
672
679
var (--spectrum-card-corner-radius )
673
680
);
674
681
background-color : var (
675
- --mod-card-background-color ,
676
- var (--spectrum-card-background-color )
682
+ --mod-card-preview-background-color ,
683
+ var (
684
+ --mod-card-background-color ,
685
+ var (--spectrum-card-preview-background-color )
686
+ )
677
687
);
678
688
min-block-size : var (
679
689
--mod-card-preview-minimum-height ,
@@ -684,8 +694,9 @@ governing permissions and limitations under the License.
684
694
margin : 0 auto;
685
695
box-sizing : border-box;
686
696
position : relative;
697
+ /* @deprecation --mod-animation-duration-100 has been renamed and will be removed in a future version. */
687
698
transition : background-color
688
- var (--mod-animation-duration- 100 , var (--spectrum-animation-duration-100 ));
699
+ var (--mod-card- animation-duration , var ( --mod-animation-duration- 100, var (--spectrum-animation-duration-100 ) ));
689
700
overflow : visible;
690
701
691
702
/* Use ::before to show the selected overlay */
@@ -729,10 +740,14 @@ governing permissions and limitations under the License.
729
740
730
741
& : hover {
731
742
border-color : transparent;
743
+
732
744
.spectrum-Card-preview {
733
745
background-color : var (
734
- --mod-card-background-color-hover ,
735
- var (--spectrum-card-background-color-hover )
746
+ --mod-card-preview-background-color-hover ,
747
+ var (
748
+ --mod-card-background-color-hover ,
749
+ var (--spectrum-card-preview-background-color-hover )
750
+ )
736
751
);
737
752
}
738
753
}
@@ -745,8 +760,11 @@ governing permissions and limitations under the License.
745
760
.spectrum-Card-preview {
746
761
transition : none;
747
762
background-color : var (
748
- --mod-card-background-color ,
749
- var (--spectrum-card-background-color )
763
+ --mod-card-preview-background-color ,
764
+ var (
765
+ --mod-card-background-color ,
766
+ var (--spectrum-card-preview-background-color )
767
+ )
750
768
);
751
769
}
752
770
@@ -796,7 +814,7 @@ governing permissions and limitations under the License.
796
814
}
797
815
798
816
.spectrum-Card--horizontal {
799
- flex-direction : row;
817
+ flex-direction : row;
800
818
801
819
& : hover {
802
820
.spectrum-Card-preview {
@@ -824,21 +842,20 @@ governing permissions and limitations under the License.
824
842
var (--spectrum-card-horizontal-preview-padding )
825
843
);
826
844
background-color : var (
827
- --mod-card-background-color ,
828
- var (--spectrum-card-background-color )
845
+ --mod-card-preview- background-color ,
846
+ var (--spectrum-card-preview- background-color )
829
847
);
830
-
831
848
border-color : var (
832
849
--mod-card-border-color ,
833
850
var (--spectrum-card-border-color )
834
851
);
835
852
}
836
853
837
- .spectrum-Card-header ,
838
- .spectrum-Card-content {
839
- margin-block-start : 0 ;
840
- block-size : auto;
841
- }
854
+ .spectrum-Card-header ,
855
+ .spectrum-Card-content {
856
+ margin-block-start : 0 ;
857
+ block-size : auto;
858
+ }
842
859
843
860
.spectrum-Card-content {
844
861
margin-block-end : 0 ;
@@ -848,12 +865,11 @@ governing permissions and limitations under the License.
848
865
padding-inline-end : 0 ;
849
866
}
850
867
851
- .spectrum-Card-body {
852
- flex-shrink : 0 ;
853
- display : flex;
854
- justify-content : center;
855
- flex-direction : column;
856
-
868
+ .spectrum-Card-body {
869
+ flex-shrink : 0 ;
870
+ display : flex;
871
+ justify-content : center;
872
+ flex-direction : column;
857
873
padding-block : 0 ;
858
874
padding-inline : var (
859
875
--mod-card-horizontal-body-padding ,
0 commit comments