// sr-only
// prevents content from being visible on the screen, but allows it to still
// be accessible to screen readers
// See: https://a11yproject.com/posts/how-to-hide-content/
@mixin sr-only {
  border: 0;
  clip-path: inset(50%);
  clip: rect(0, 0, 0, 0);
  height: 1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

// sr-only-focusable
// Use in conjunction with .sr-only to only display content when it's focused.
// Good for "Skip to main content" links.
@mixin sr-only-focusable {
  &:active,
  &:focus {
    clip-path: none;
    clip: auto;
    height: auto;
    overflow: visible;
    position: static;
    white-space: normal;
    width: auto;
  }
}
