-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFeatureDisplayPageFeature.astro
More file actions
82 lines (70 loc) · 1.7 KB
/
FeatureDisplayPageFeature.astro
File metadata and controls
82 lines (70 loc) · 1.7 KB
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
---
import { Image } from "astro:assets";
interface Props {
image?: any;
alt?: string;
}
const { image, alt = "Feature illustration" } = Astro.props as Props;
---
<div class="feature-source-item" style="display: none;">
{image && <Image src={image} alt={alt} width={1200} />}
</div>
<div class="feature-label-display">
<div class="feature-copy">
<div class="feature-title">
<slot name="title" />
</div>
<div class="feature-description">
<slot name="description" />
</div>
</div>
</div>
<style>
.feature-label-display {
position: absolute;
color: var(--accent-color);
pointer-events: none;
will-change: transform, opacity;
transition: color 0.4s ease;
}
.feature-copy {
display: flex;
flex-direction: column;
gap: 0.55rem;
width: clamp(220px, 18vw, 300px);
max-width: clamp(220px, 18vw, 300px);
white-space: normal;
}
.feature-title {
font-family: "Satoshi-Bold", "Harmony-OS-Sans-SC-Bold", sans-serif;
font-size: clamp(1.6rem, 3.2vw, 2.6rem);
font-weight: bold;
line-height: 1.12;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: inherit;
}
.feature-description {
font-size: clamp(0.8rem, 0.95vw, 0.95rem);
line-height: 1.5;
color: var(--text-color-dimmer);
white-space: normal;
overflow-wrap: anywhere;
}
.feature-label-display.active {
color: var(--accent-color);
}
.feature-label-display.active .feature-description {
color: var(--sub-text-color);
}
@media (max-width: 768px) {
.feature-copy {
width: min(76vw, 24rem);
max-width: min(76vw, 24rem);
}
.feature-title {
text-align: center;
}
}
</style>