From a93b026af98ef5d20f242633871a2b222eb090b5 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 14 Jan 2022 18:02:36 +0100 Subject: fix: make links pseudo elements consistent between browsers On Chromium the pseudo elements (like external links icon) was not displayed correctly. --- src/styles/base/_typography.scss | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/styles/base/_typography.scss b/src/styles/base/_typography.scss index 5bf8eea..0aea717 100644 --- a/src/styles/base/_typography.scss +++ b/src/styles/base/_typography.scss @@ -157,37 +157,35 @@ a { text-decoration-thickness: 18%; } - &[hreflang], &.external { - grid-template-columns: minmax(0, 1fr) fun.convert-px(50); - &::after { - display: inline-flex; - flex-flow: row nowrap; - width: fun.convert-px(14); - margin-right: 0.5ex; - font-size: var(--font-size-sm); + display: inline-block; + content: "\0000a0"url(fun.encode-svg('')); } - } - &.external { - &::after { - content: "\0000a0"url(fun.encode-svg('')); + &:focus:not(:active)::after { + content: "\0000a0"url(fun.encode-svg('')); } } &[hreflang] { &::after { + display: inline-block; content: "\0000a0["attr(hreflang) "]"; - text-decoration: none; + font-size: var(--font-size-sm); } &.external { &::after { content: "\0000a0["attr(hreflang) "]\0000a0"url(fun.encode-svg( - '' + '' + )); + } + + &:focus:not(:active)::after { + content: "\0000a0["attr(hreflang) "]\0000a0"url(fun.encode-svg( + '' )); - margin-right: 4.5ex; } } } -- cgit v1.2.3