From 525dac15b0a2a15b23b959948450e85c5094eebc Mon Sep 17 00:00:00 2001 From: Sophie Schneider Date: Mon, 15 Nov 2021 08:59:43 -0500 Subject: [PATCH] used gov uk design system styles for visually hidden since they have already been tested --- src/styles/shared/_accessibility.scss | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/styles/shared/_accessibility.scss b/src/styles/shared/_accessibility.scss index 3ca95d40f73..3867409464e 100644 --- a/src/styles/shared/_accessibility.scss +++ b/src/styles/shared/_accessibility.scss @@ -1,14 +1,16 @@ /// Used to hide an element visually, but keeping it accessible for /// accessibility tools. +/// styles referenced from GOV.UK design system +/// https://github.com/h5bp/main.css/issues/12#issuecomment-451965809 @mixin visually-hidden { - clip-path: inset(50%); - height: 1px; - width: 1px; - overflow: hidden; position: absolute; - white-space: nowrap; + width: 1px; + height: 1px; margin: 0; padding: 0; + overflow: hidden; + clip-path: inset(50%); border: 0; + white-space: nowrap; }