_screen-reader.scss 648 B

1234567891011121314151617181920212223242526272829303132
  1. // Only display content to screen readers
  2. //
  3. // See: http://a11yproject.com/posts/how-to-hide-content/
  4. @mixin sr-only {
  5. position: absolute;
  6. width: 1px;
  7. height: 1px;
  8. padding: 0;
  9. margin: -1px;
  10. overflow: hidden;
  11. clip: rect(0,0,0,0);
  12. border: 0;
  13. }
  14. // Use in conjunction with .sr-only to only display content when it's focused.
  15. //
  16. // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
  17. //
  18. // Credit: HTML5 Boilerplate
  19. @mixin sr-only-focusable {
  20. &:active,
  21. &:focus {
  22. position: static;
  23. width: auto;
  24. height: auto;
  25. margin: 0;
  26. overflow: visible;
  27. clip: auto;
  28. }
  29. }