File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 33
33
}
34
34
}
35
35
36
- .container {
37
- border : var (--_outline-width ) solid var (--_outline-color );
36
+ .outline {
37
+ border-color : var (--_outline-color );
38
+ border-width : var (--_outline-width );
38
39
}
39
40
}
Original file line number Diff line number Diff line change 18
18
z-index : 0 ;
19
19
}
20
20
21
- // Separate element will be needed for disabled opacities (b/307361748)
22
- .container {
23
- background : var ( --_container-color );
21
+ md-elevation ,
22
+ .background ,
23
+ .outline {
24
24
border-radius : inherit ;
25
25
inset : 0 ;
26
26
position : absolute ;
27
+ }
28
+
29
+ // Separate element will be needed for disabled opacities (b/307361748)
30
+ .background {
31
+ background : var (--_container-color );
27
32
// Place behind content.
28
33
z-index : -1 ;
29
34
}
30
35
36
+ // Separate element needed to overlay on top of content as opposed to
37
+ // background, which is behind content. All cards have an outline for HCM.
38
+ .outline {
39
+ // A default transparent border that is visible in HCM
40
+ border : 1px solid transparent ;
41
+ // Outline should be placed on top of content, such as images.
42
+ z-index : 1 ;
43
+ }
44
+
31
45
md-elevation {
32
- border-radius : inherit ;
33
46
// Place behind content.
34
47
z-index : -1 ;
35
48
Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ export class Card extends LitElement {
15
15
protected override render ( ) {
16
16
return html `
17
17
< md-elevation part ="elevation "> </ md-elevation >
18
- < div class ="container "> </ div >
18
+ < div class ="background "> </ div >
19
19
< slot > </ slot >
20
+ < div class ="outline "> </ div >
20
21
` ;
21
22
}
22
23
}
You can’t perform that action at this time.
0 commit comments