-
Notifications
You must be signed in to change notification settings - Fork 1
/
ps2-map.css
119 lines (100 loc) · 3.16 KB
/
ps2-map.css
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
112
113
114
115
116
117
118
119
html {
--ps2map__faction-ns-colour: rgba(63, 63, 63, 0.8);
--ps2map__faction-vs-colour: rgba(183, 77, 213, 0.8);
--ps2map__faction-nc-colour: rgba(60, 127, 255, 0.8);
--ps2map__faction-tr-colour: rgba(226, 25, 25, 0.8);
--ps2map__lattice-disabled: rgba(255, 255, 255, 0.15);
--ps2map__lattice-contested: rgba(255, 160, 0, 1.0);
}
.ps2map__viewport {
background-color: #051110;
overflow: hidden;
}
.ps2map__layer {
position: absolute;
pointer-events: none;
-webkit-user-select: none;
user-select: none;
transition: transform 200ms ease-out;
}
#hexes {
--ps2map__base-hexes__stroke-width: 4px;
}
#hexes>svg>polygon {
fill: rgb(255, 255, 255);
fill-opacity: 0.3;
pointer-events: visiblePainted;
stroke: #000000;
stroke-width: var(--ps2map__base-hexes__stroke-width);
/* Hover effects are applied in code as we need to reorder the SVG contents
to promote the hovered element's outline, which has a habit of breaking
the :hover pseudoclass. */
}
.ps2map__base-names__icon {
--ps2map__base-color: #333333;
--ps2map__base-icon-size: 1.5em;
line-height: 0.95em;
font-weight: 500;
position: absolute;
text-align: center;
height: 2em;
width: 8em;
/* Slightly janky workaround for getting more pronounced text shadows. The
performance hit is not so bad, but we'll need to keep an eye on this as
more layers get implemented and start loading the renderer. */
text-shadow:
#333333 0.1em 0.1em 0.2em,
#333333 -0.1em -0.1em 0.2em;
}
.ps2map__base-names__icon::before {
background-color: var(--ps2map__base-color);
position: absolute;
border-radius: calc(var(--ps2map__base-icon-size) * 0.5);
height: var(--ps2map__base-icon-size);
width: var(--ps2map__base-icon-size);
right: calc(50% - var(--ps2map__base-icon-size) * 0.5);
top: calc(0em - var(--ps2map__base-icon-size));
}
.ps2map__base-names__icon__amp-station::before {
content: url(./img/icons/amp-station.svg);
}
.ps2map__base-names__icon__bio-lab::before {
content: url(./img/icons/bio-lab.svg);
}
.ps2map__base-names__icon__construction-outpost::before {
content: url(./img/icons/construction-outpost.svg);
}
.ps2map__base-names__icon__containment-site::before {
content: url(./img/icons/containment-site.svg);
}
.ps2map__base-names__icon__interlink::before {
content: url(./img/icons/interlink.svg);
}
.ps2map__base-names__icon__large-outpost::before {
--ps2map__base-icon-size: 1.2em;
content: url(./img/icons/large-outpost.svg);
}
.ps2map__base-names__icon__small-outpost::before {
--ps2map__base-icon-size: 1.08em;
content: url(./img/icons/small-outpost.svg);
}
.ps2map__base-names__icon__tech-plant::before {
content: url(./img/icons/tech-plant.svg);
}
.ps2map__base-names__icon__trident::before {
content: url(./img/icons/trident.svg);
}
.ps2map__base-names__icon__warpgate::before {
content: url(./img/icons/warpgate.svg);
}
.ps2map__terrain {
background-size: 100%;
}
.ps2map__terrain__tile {
background-size: 100%;
position: absolute;
}
.ps2map__lattice>svg>line {
stroke: #000000;
stroke-width: 12px;
}