From 0bb68cd3086c3ae141a0a2e59efbef86a6691c7d Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 19 Dec 2023 12:26:05 +0200 Subject: [PATCH] [develop | FIXED | DONE]: Fix access-route-badge dot positions. --- less/general.less | 62 +++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/less/general.less b/less/general.less index 0a24cbf..bde21a4 100644 --- a/less/general.less +++ b/less/general.less @@ -382,30 +382,50 @@ a:hover .text-usage-counts-hover:extend(.uk-text-background) { height: @general-access-route-badge-size; position: relative; + &:has(:first-child) { + & > .dot:first-child { + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } + + &:has(:nth-child(2)) { + & > .dot:first-child { + left: 0; + transform: translate(0, -50%); + } + + & > .dot:nth-child(2) { + right: 0; + top: 50%; + transform: translate(0, -50%); + } + + &:has(:nth-child(3)) { + & > .dot:first-child { + left: 0; + top: 100%; + transform: translate(0, -100%); + } + + & > .dot:nth-child(2) { + right: 0; + top: 100%; + transform: translate(0, -100%); + } + + & > .dot:nth-child(3) { + left: 50%; + top: 0; + transform: translate(-50%, 0); + } + } + } + } + & > .dot { position: absolute; margin-right: 0 !important; - - &:first-child { - bottom: 0; - left: 0; - - &:last-child { - left: 50%; - transform: translateX(-50%); - } - } - - &:nth-child(2) { - bottom: 0; - right: 0; - } - - &:nth-child(3) { - top: 0; - left: 50%; - transform: translateX(-50%); - } } }