/
calcite-card.scss
111 lines (96 loc) · 1.8 KB
/
calcite-card.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
:host {
@apply max-w-full block;
& .calcite-card-container {
@apply flex
h-full
flex-col
justify-between
bg-foreground-1
duration-150
ease-in-out
relative
border
border-solid
border-color-2
text-color-3
shadow-none;
&:hover {
@apply shadow-1-lg;
z-index: 1;
}
&:active {
@apply shadow-1-sm duration-75;
z-index: 1;
}
}
}
.container {
@apply flex-auto flex flex-col;
}
:host([loading]) .calcite-card-container *:not(calcite-loader):not(.calcite-card-loader-container) {
@apply opacity-0 pointer-events-none;
}
:host([loading]) .calcite-card-loader-container {
@apply flex
items-center
absolute
inset-0;
}
.header,
.footer {
@apply pt-3 pb-1 px-3 flex;
}
.header {
@apply flex-col;
}
.footer {
@apply pt-1 pb-3 px-3
flex-row
content-between
justify-between
mt-auto;
}
.card-content {
@apply p-3
text-color-3
text-n2-wrap;
}
// selectable and selected styles
:host([selectable]) .calcite-card-container:active {
@apply shadow-1-sm;
}
:host([selected]) .calcite-card-container {
@apply border-color-brand;
}
// slotted content
@include slotted("title", "*") {
@apply font-medium
text-color-1
m-0
text-n1-wrap;
}
@include slotted("subtitle", "*") {
@apply font-normal
text-color-2
m-0
mt-2
text-n2-wrap;
}
@include slotted("thumbnail", "img") {
@apply max-w-full min-w-full;
}
@include slotted("footer-leading", "*") {
@apply self-center text-n2-wrap;
margin-inline-end: auto;
}
@include slotted("footer-trailing", "*") {
@apply self-center text-n2-wrap;
}
.thumbnail-wrapper {
@apply text-0-wrap;
}
.checkbox-wrapper {
@apply absolute m-0 p-0;
top: theme("spacing.2");
inset-inline-end: theme("spacing.2");
}