@appartmint/css-mint 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/// card.scss - Card styles
|
|
2
|
+
/// @author App Art Mint LLC
|
|
3
|
+
///
|
|
4
|
+
/// @group Widget
|
|
5
|
+
@charset 'utf-8';
|
|
6
|
+
|
|
7
|
+
/// Imports
|
|
8
|
+
@use 'sass:math';
|
|
9
|
+
@use '../../util' as *;
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
@include css-var-ref(card-r, br);
|
|
13
|
+
@include css-var-ref(card-shadow-s, shadow-s);
|
|
14
|
+
@include css-var-ref(card-shadow-c, shadow-c);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/// Card Styles
|
|
18
|
+
#{class(card)} {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
position: relative;
|
|
22
|
+
height: 100%;
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
margin: 0;
|
|
25
|
+
border-radius: css-var(card-r);
|
|
26
|
+
box-shadow: css-var(card-shadow-s) css-var(card-shadow-c);
|
|
27
|
+
|
|
28
|
+
@include break(sm) {
|
|
29
|
+
flex-direction: row;
|
|
30
|
+
|
|
31
|
+
&#{class(reverse)} {
|
|
32
|
+
flex-direction: row-reverse;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:has(#{class(carousel)}) {
|
|
37
|
+
box-shadow: none;
|
|
38
|
+
|
|
39
|
+
#{class(content)} {
|
|
40
|
+
box-shadow: css-var(card-shadow-s) css-var(card-shadow-c);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&#{class(center)} {
|
|
45
|
+
@mixin title {
|
|
46
|
+
#{class(title)} {
|
|
47
|
+
justify-content: center;
|
|
48
|
+
text-align: center;
|
|
49
|
+
|
|
50
|
+
& > div {
|
|
51
|
+
width: auto;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin content {
|
|
57
|
+
#{class(content)} {
|
|
58
|
+
& > * {
|
|
59
|
+
text-align: center;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@mixin buttons {
|
|
65
|
+
#{class(buttons)} {
|
|
66
|
+
justify-content: center;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@include title;
|
|
71
|
+
@include content;
|
|
72
|
+
@include buttons;
|
|
73
|
+
|
|
74
|
+
&-title {
|
|
75
|
+
@include title;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&-content {
|
|
79
|
+
@include content;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&-btns {
|
|
83
|
+
@include buttons;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&#{class(stagger)} {
|
|
88
|
+
position: relative;
|
|
89
|
+
width: 100%;
|
|
90
|
+
|
|
91
|
+
@include break(sm) {
|
|
92
|
+
flex-direction: row;
|
|
93
|
+
border-radius: 0;
|
|
94
|
+
box-shadow: none;
|
|
95
|
+
overflow: visible;
|
|
96
|
+
|
|
97
|
+
& > #{class(image)} {
|
|
98
|
+
width: calc(50% + css-var(card-padding));
|
|
99
|
+
height: fit-content;
|
|
100
|
+
margin-right: calc(css-var(card-padding) * -2);
|
|
101
|
+
border-radius: css-var(card-radius);
|
|
102
|
+
|
|
103
|
+
img {
|
|
104
|
+
height: 100%;
|
|
105
|
+
object-fit: cover;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
& > #{class(content)} {
|
|
110
|
+
height: fit-content;
|
|
111
|
+
width: calc(50% + css-var(card-padding));
|
|
112
|
+
margin-top: calc(2 * css-var(card-padding));
|
|
113
|
+
border-radius: css-var(card-radius);
|
|
114
|
+
box-shadow: css-var(card-shadow-size) css-var(card-shadow-color);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&#{class(reverse)} {
|
|
119
|
+
@include break(sm) {
|
|
120
|
+
flex-direction: row-reverse;
|
|
121
|
+
|
|
122
|
+
& > #{class(image)} {
|
|
123
|
+
margin-right: 0;
|
|
124
|
+
margin-left: calc(css-var(card-padding) * -2);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
& > #{class(image)} {
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
|
|
133
|
+
@include break(sm) {
|
|
134
|
+
width: 50%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:only-child {
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
& + #{class(content)} {
|
|
142
|
+
@include break(sm) {
|
|
143
|
+
width: 50%;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
#{class(content)} {
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
gap: calc(css-var(gap) * 2);
|
|
152
|
+
position: relative;
|
|
153
|
+
padding: css-var(card-padding);
|
|
154
|
+
background: css-var(card-back);
|
|
155
|
+
width: 100%;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
|
|
158
|
+
& > * {
|
|
159
|
+
margin-top: 0;
|
|
160
|
+
margin-bottom: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
#{class(title)} {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
align-items: center;
|
|
168
|
+
height: fit-content;
|
|
169
|
+
gap: css-var(card-padding);
|
|
170
|
+
text-align: center;
|
|
171
|
+
width: 100%;
|
|
172
|
+
|
|
173
|
+
@include break(xs) {
|
|
174
|
+
flex-direction: row;
|
|
175
|
+
text-align: left;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&:only-child {
|
|
179
|
+
height: 100%;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
& > #{class(image)} {
|
|
183
|
+
width: 100%;
|
|
184
|
+
height: 100%;
|
|
185
|
+
max-width: css-var(card-logo-size);
|
|
186
|
+
max-height: css-var(card-logo-size);
|
|
187
|
+
|
|
188
|
+
&#{class(large)} {
|
|
189
|
+
max-width: calc(2 * css-var(card-logo-size));
|
|
190
|
+
max-height: calc(2 * css-var(card-logo-size));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
img {
|
|
194
|
+
display: block;
|
|
195
|
+
width: 100%;
|
|
196
|
+
height: 100%;
|
|
197
|
+
object-fit: contain;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
i {
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
min-width: css-var(card-logo-size);
|
|
206
|
+
max-width: css-var(card-logo-size);
|
|
207
|
+
margin: 0;
|
|
208
|
+
font-size: calc(css-var(card-logo-size) - 1rem);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
& > div {
|
|
212
|
+
width: 100%;
|
|
213
|
+
|
|
214
|
+
& > * {
|
|
215
|
+
margin: 0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
#{class(date)} {
|
|
221
|
+
text-align: center;
|
|
222
|
+
|
|
223
|
+
@include break(xs) {
|
|
224
|
+
text-align: left;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&-grid {
|
|
229
|
+
position: relative;
|
|
230
|
+
background: css-var(card-back);
|
|
231
|
+
|
|
232
|
+
&:has(#{class(image)}) {
|
|
233
|
+
#{class(content)} {
|
|
234
|
+
margin-top: 25%;
|
|
235
|
+
padding-top: 25%;
|
|
236
|
+
background: none;
|
|
237
|
+
border: none;
|
|
238
|
+
|
|
239
|
+
&::before {
|
|
240
|
+
opacity: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&::after {
|
|
244
|
+
content: '';
|
|
245
|
+
position: absolute;
|
|
246
|
+
top: 0;
|
|
247
|
+
left: 0;
|
|
248
|
+
width: 100%;
|
|
249
|
+
height: 100%;
|
|
250
|
+
opacity: 0.75;
|
|
251
|
+
mask-image: none;
|
|
252
|
+
background: linear-gradient(0deg, black, rgba(0,0,0,70%) 66%, css-var(shadow-0));
|
|
253
|
+
transition: opacity delay(default) ease-in-out;
|
|
254
|
+
z-index: -1;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@include states(hover) {
|
|
260
|
+
#{class(content)} {
|
|
261
|
+
&::after {
|
|
262
|
+
opacity: 1;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
#{class(image)} {
|
|
268
|
+
position: absolute;
|
|
269
|
+
top: 0;
|
|
270
|
+
left: 0;
|
|
271
|
+
width: 100%;
|
|
272
|
+
height: 100%;
|
|
273
|
+
|
|
274
|
+
img {
|
|
275
|
+
height: 100%;
|
|
276
|
+
object-fit: contain;
|
|
277
|
+
object-position: top;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
#{class(content)} {
|
|
282
|
+
justify-content: flex-end;
|
|
283
|
+
background: css-var(shadow-0);
|
|
284
|
+
|
|
285
|
+
#{class(buttons)} {
|
|
286
|
+
margin-top: 0 !important;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
&-actions {
|
|
292
|
+
#{class(content)} {
|
|
293
|
+
flex-direction: row;
|
|
294
|
+
justify-content: space-between;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
#{class(grid)}#{class('3')},
|
|
300
|
+
#{class(grid)}#{class('4')} {
|
|
301
|
+
#{class(card)} {
|
|
302
|
+
flex-direction: column !important;
|
|
303
|
+
|
|
304
|
+
& > #{class(image)} {
|
|
305
|
+
overflow: hidden;
|
|
306
|
+
|
|
307
|
+
@include break(sm) {
|
|
308
|
+
width: 100%;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
& + #{class(content)} {
|
|
312
|
+
@include break(sm) {
|
|
313
|
+
width: 100%;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
#{class(content)} {
|
|
319
|
+
flex-grow: 1;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
#{class(title)} {
|
|
323
|
+
@include break(xs) {
|
|
324
|
+
flex-direction: column;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
#{class(buttons)} {
|
|
329
|
+
margin-top: auto;
|
|
330
|
+
|
|
331
|
+
#{class(btn)} {
|
|
332
|
+
width: 100%;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use 'card';
|
|
2
|
+
@use 'modal';
|