From 0a577857ee1d69c709198b3a88837b86aa7e772d Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Wed, 27 Sep 2023 08:52:45 +0100 Subject: [PATCH] Fix focus state for links & colour scheme picker --- src/css/exceptions/color-scheme-picker.css | 3 ++- src/css/exceptions/site-title.css | 2 +- src/css/globals.css | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/css/exceptions/color-scheme-picker.css b/src/css/exceptions/color-scheme-picker.css index b07fab1..9e07fce 100644 --- a/src/css/exceptions/color-scheme-picker.css +++ b/src/css/exceptions/color-scheme-picker.css @@ -30,7 +30,8 @@ header > * { &:has(:focus-visible) { outline: 1px solid var(--color-primary); - outline-offset: 2px; + outline-offset: 4px; + border-radius: 5%; } &:has([name="color-scheme"]) { diff --git a/src/css/exceptions/site-title.css b/src/css/exceptions/site-title.css index d2e985b..9ff090b 100644 --- a/src/css/exceptions/site-title.css +++ b/src/css/exceptions/site-title.css @@ -5,7 +5,7 @@ text-decoration: none; &:hover, &:focus, &:focus-visible { - outline-color: transparent; + outline: 0px transparent; text-decoration: underline solid var(--color-primary) 2px; } } diff --git a/src/css/globals.css b/src/css/globals.css index bf15949..7e3f856 100644 --- a/src/css/globals.css +++ b/src/css/globals.css @@ -117,3 +117,9 @@ footer { padding: var(--space-size-l) 0 var(--space-size-s); width: 100%; } + +*:focus-visible { + outline: 1px solid var(--color-primary); + border-radius: 5%; + outline-offset: 4px; +} \ No newline at end of file