Web Dev Solutions

Catalin Mititiuc

From 4a4efb894f0e227e1331aa4f3a47753ce749ed0d Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Sat, 27 Jul 2024 14:10:06 -0700 Subject: Good-for-now fix to counter positions for webkit --- public/assets/css/map.css | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) (limited to 'public') 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); } -- cgit v1.2.3