/// Improved screen reader only CSS class
/// @author Gaël Poupard
/// licence https://codepen.io/ffoodd/pen/gwKZyq/license
///  Based on Yahoo!'s technique
/// @author Thierry Koblentz
/// @link https://developer.yahoo.com/blogs/ydn/clip-hidden-content-better-accessibility-53456.html
/// 1.
///  `clip` is deprecated but works everywhere
/// @link https://developer.mozilla.org/en-US/docs/Web/CSS/clip
/// 2.
///  `clip-path` is the future-proof version, but not very well supported yet
/// @link https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path
/// @link http://caniuse.com/#search=clip-path
/// @author Yvain Liechti
/// @link https://twitter.com/ryuran78/status/778943389819604992
/// 3.
///  preventing text to be condensed
/// @author J. Renée Beach
/// @link https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
///  Drupal 8 goes with word-wrap: normal instead
/// @link https://www.drupal.org/node/2045151
/// @link http://cgit.drupalcode.org/drupal/commit/?id=5b847ea
/// 4.
///  !important is important
///  Obviously you wanna hide something
/// @author Harry Roberts
/// @link https://csswizardry.com/2016/05/the-importance-of-important/
@mixin screenreader-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important; /* 1 */
    clip-path: inset(50%) !important; /* 2 */
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important; /* 3 */
}

/// Use in conjunction with .sr-only to only display content when it's focused.
///  Useful for skip links
/// @link http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
///  Based on a HTML5 Boilerplate technique, included in Bootstrap
///  Fixed a bug with position: static on iOS 10.0.2 + VoiceOver
/// @author Sylvain Pigeard
/// @link https://github.com/twbs/bootstrap/issues/20732
@mixin screenreader-only-focusable {
    &:focus,
    &:active {
        clip: auto !important;
        clip-path: none !important;
        height: auto !important;
        margin: auto !important;
        overflow: visible !important;
        width: auto !important;
        white-space: normal !important;
    }
}
