2019-05-20 10:03:51 +02:00
|
|
|
// stylelint-disable declaration-no-important
|
|
|
|
|
2020-07-31 11:27:36 +02:00
|
|
|
// Hide content visually while keeping it accessible to assistive technologies
|
2015-03-31 02:36:00 +02:00
|
|
|
//
|
2018-04-01 09:35:51 +02:00
|
|
|
// See: https://a11yproject.com/posts/how-to-hide-content/
|
2017-09-26 14:24:14 +02:00
|
|
|
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
|
2015-03-31 02:36:00 +02:00
|
|
|
|
2020-07-31 11:27:36 +02:00
|
|
|
@mixin visually-hidden() {
|
2019-05-20 10:03:51 +02: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-31 02:36:00 +02:00
|
|
|
}
|
|
|
|
|
2019-05-20 10:03:51 +02:00
|
|
|
// Use to only display content when it's focused.
|
2015-03-31 02:36:00 +02:00
|
|
|
//
|
2016-10-03 18:55:59 +02:00
|
|
|
// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
|
2015-03-31 02:36:00 +02:00
|
|
|
|
2020-07-31 11:27:36 +02:00
|
|
|
@mixin visually-hidden-focusable() {
|
2019-05-20 10:03:51 +02:00
|
|
|
&:not(:focus) {
|
2020-07-03 13:38:11 +02:00
|
|
|
@include visually-hidden();
|
2015-03-31 02:36:00 +02:00
|
|
|
}
|
|
|
|
}
|