Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-07-27 14:10:06 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-07-27 14:10:06 -0700
commit4a4efb894f0e227e1331aa4f3a47753ce749ed0d (patch)
tree16f1a07543d34c30d25a311decbb2dbb45bc43d5 /public/assets/css
parent54ad14b3f97eed8ae1d2b0664d17dc74f1578bd5 (diff)
Good-for-now fix to counter positions for webkit
Diffstat (limited to 'public/assets/css')
-rw-r--r--public/assets/css/map.css37
1 files changed, 11 insertions, 26 deletions
diff --git a/public/assets/css/map.css b/public/assets/css/map.css
index 461f72f..7e74efb 100644
--- a/public/assets/css/map.css
+++ b/public/assets/css/map.css
@@ -501,48 +501,33 @@ text.elevation {
}
use[class^="counter-"] {
- --scale: 1;
- --translateX: -5px;
- --translateY: -5px;
transform: scale(var(--scale)) translate(var(--translateX), var(--translateY));
-}
-
-use[class^="counter-"] {
- transition: x 0.25s, y 0.25s;
+ transition: transform 0.25s;
--scale: 0.5;
}
g.counter use[class^="counter-"] {
- x: calc(var(--x) * 1.25);
- y: calc(var(--y) * 1.25);
+ --translateX: calc(var(--x) - 5px);
+ --translateY: var(--y);
}
-[data-q][data-r][data-s][data-t] > use[class^="counter-"] {
- x: calc(var(--x) / 6);
- y: calc(var(--y) / 6);
-}
-
-/* Counters carried by a trooper */
-[data-q][data-r][data-s][data-t]:hover g.counter use[class^="counter-"] {
- /*x: calc(var(--x) * 1.5);*/
- /*y: calc(var(--y) * 1.5);*/
- /*--translateY: -5px;*/
+[data-q][data-r][data-s][data-t] > use[class^="counter-"],
+.grid-top > use[class^="counter-"] {
+ --translateX: calc(var(--x) / 6 - 5px);
+ --translateY: calc(var(--y) / 6 - 5px);
}
-/* Counters placed on a hex */
[data-q][data-r][data-s][data-t]:hover > g.counter ~ use[class^="counter-"],
[data-q][data-r][data-s][data-t].hover > g.counter ~ use[class^="counter-"],
.grid-top > g.counter ~ use[class^="counter-"] {
- x: calc(var(--x) * 2);
- y: calc(var(--y) * 2);
- --translateY: -5px;
+ --translateX: calc(var(--x) * 2 - 5px);
+ --translateY: calc(var(--y) * 2 - 5px);
}
[data-q][data-r][data-s][data-t]:hover > use[class^="counter-"],
[data-q][data-r][data-s][data-t].hover > use[class^="counter-"],
.grid-top > use[class^="counter-"] {
- x: calc(var(--x) * 1.5);
- y: calc(var(--y) * 1.5);
- --translateY: -5px;
+ --translateX: calc(var(--x) * 1.5 - 5px);
+ --translateY: calc(var(--y) * 1.5 - 5px);
}