2019-05-20 04:03:51 -04:00
|
|
|
// stylelint-disable declaration-no-important
|
|
|
|
|
2020-07-31 05:27:36 -04:00
|
|
|
// Hide content visually while keeping it accessible to assistive technologies
|
2015-03-30 20:36:00 -04:00
|
|
|
//
|
2020-09-17 13:01:04 -04:00
|
|
|
// See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
|
2017-09-26 08:24:14 -04:00
|
|
|
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
|
2015-03-30 20:36:00 -04:00
|
|
|
|
2020-07-31 05:27:36 -04:00
|
|
|
@mixin visually-hidden() {
|
2019-05-20 04:03:51 -04:00
|
|
|
position: absolute !important;
|
|
|
|
width: 1px !important;
|
|
|
|
height: 1px !important;
|
|
|
|
padding: 0 !important;
|
|
|
|
margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
|
|
|
|
overflow: hidden !important;
|
|
|
|
clip: rect(0, 0, 0, 0) !important;
|
|
|
|
white-space: nowrap !important;
|
|
|
|
border: 0 !important;
|
2015-03-30 20:36:00 -04:00
|
|
|
}
|
|
|
|
|
2019-05-20 04:03:51 -04:00
|
|
|
// Use to only display content when it's focused.
|
2015-03-30 20:36:00 -04:00
|
|
|
//
|
2016-10-03 12:55:59 -04:00
|
|
|
// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
|
2015-03-30 20:36:00 -04:00
|
|
|
|
2020-07-31 05:27:36 -04:00
|
|
|
@mixin visually-hidden-focusable() {
|
2019-05-20 04:03:51 -04:00
|
|
|
&:not(:focus) {
|
2020-07-03 07:38:11 -04:00
|
|
|
@include visually-hidden();
|
2015-03-30 20:36:00 -04:00
|
|
|
}
|
|
|
|
}
|