-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.css
More file actions
84 lines (75 loc) · 1.58 KB
/
map.css
File metadata and controls
84 lines (75 loc) · 1.58 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
:root {
--color-departures: steelblue;
--color-arrivals: darkorange;
}
html, body {
margin: 0;
padding: 5;
height: 100%;
width: 100%;
display: flex;
justify-content: center; /* Center horizontally */
align-items: center; /* Center vertically */
}
#map {
width: 100%; /* Adjust width to your desired size */
height: 100%; /* Adjust height to your desired size */
position: relative;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: subtle shadow for effect */
border-radius: 8px; /* Optional: rounded corners */
}
#map svg {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none; /* Allows map interactions through the SVG */
}
#map svg circle {
pointer-events: auto;
fill-opacity: 0.6;
stroke: white;
stroke-width: 1;
--color-departures: steelblue;
--color-arrivals: darkorange;
--color: color-mix(
in oklch,
var(--color-departures) calc(100% * var(--departure-ratio)),
var(--color-arrivals)
);
fill: var(--color);
}
.legend {
display: flex;
align-items: center;
gap: 1em;
margin: 1em 0;
}
.legend-title {
font-weight: bold;
margin-right: 1em;
}
.legend-item {
display: flex;
align-items: center;
position: relative;
padding: 0.25em 0.5em;
}
.legend-item::before {
content: "";
display: inline-block;
width: 1em;
height: 1em;
border-radius: 50%;
margin-right: 0.5em;
background: color-mix(
in oklch,
var(--color-departures) calc(100% * var(--departure-ratio)),
var(--color-arrivals)
);
}
.legend-text {
display: inline-block;
}