From a57951805e859859dd3d6f91a994d2a5da432b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 11 May 2020 09:38:59 +0200 Subject: [PATCH] misc: add class to limit textual element to screenreaders (#42692) --- gadjo/static/css/_utils.scss | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gadjo/static/css/_utils.scss b/gadjo/static/css/_utils.scss index 4372c58..984fc80 100644 --- a/gadjo/static/css/_utils.scss +++ b/gadjo/static/css/_utils.scss @@ -21,3 +21,20 @@ @return #ffffff; } } + +// Only display content to screen readers +@mixin sr-only { + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} + +.sr-only { + @include sr-only(); +}