-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.css
More file actions
105 lines (89 loc) · 2.71 KB
/
index.css
File metadata and controls
105 lines (89 loc) · 2.71 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.annotation-container-grid {
display: grid; /* Use Grid layout */
/* Define grid areas */
grid-template-areas:
"layer"; /* Single area named 'image' */
grid-template-columns: 1fr; /* Single column takes full width */
grid-template-rows: auto; /* Row height determined by content (image) */
width: 100%; /* Or specific dimensions */
margin: auto; /* Center the container */
}
.background-image-grid {
/* Assign to the 'image' area */
grid-area: layer;
/* Make sure it behaves correctly */
display: block;
width: 100%;
height: auto;
user-select: none;
/* Ensure it's below the overlay */
z-index: 1;
}
.annotations-overlay-grid {
/* Assign to the 'image' area */
grid-area: layer;
/* CRITICAL: This layer MUST be a positioning context for its children */
position: relative;
/* Ensure it's above the image */
z-index: 2;
/* Optional: If children might overflow */
overflow: hidden;
pointer-events: none; /* Allows clicks/hovers to pass through */
/* We DON'T need top, left, width, height, or position: absolute here anymore */
/* Grid layout handles its position and size based on the grid cell */
}
/* --- Styles for annotations INSIDE the overlay remain the same --- */
/* --- (using position: absolute relative to .annotations-overlay-grid) --- */
.annotation-line {
position: absolute; /* Positioned relative to .annotations-overlay-grid */
background-color: rgba(255, 255, 255, 0.8);
/* height/width/top/left set via inline styles */
z-index: 3; /* Above overlay background, if overlay had one */
}
.annotation-text {
position: absolute; /* Positioned relative to .annotations-overlay-grid */
color: rgba(255, 255, 255, 0.9);
font-family: sans-serif;
font-size: 10px;
line-height: 1.3;
pointer-events: auto; /* Make text selectable */
white-space: pre-line;
max-width: 150px;
z-index: 4; /* Above lines */
}
.annotation-text span {
display: block;
}
.annotation-text .title {
font-weight: bold;
text-transform: uppercase;
font-size: 11px;
margin-bottom: 3px;
}
.annotation-text .description {
font-size: 9px;
}
/* Fluid typography using clamp */
.annotation-text .title {
display: block;
font-size: clamp(0.8rem, 0.6vw + 0.5rem, 1.2rem);
font-weight: bold;
margin-bottom: 0.25em;
}
.annotation-text .description {
display: block;
font-size: clamp(0.7rem, 0.5vw + 0.4rem, 1rem);
line-height: 1.3;
}