_a11y.scss 900 B

12345678910111213141516171819202122232425262728293031
  1. @mixin cdk-a11y {
  2. .cdk-visually-hidden {
  3. border: 0;
  4. clip: rect(0 0 0 0);
  5. height: 1px;
  6. margin: -1px;
  7. overflow: hidden;
  8. padding: 0;
  9. position: absolute;
  10. width: 1px;
  11. // Avoid browsers rendering the focus ring in some cases.
  12. outline: 0;
  13. // Avoid some cases where the browser will still render the native controls (see #9049).
  14. -webkit-appearance: none;
  15. -moz-appearance: none;
  16. }
  17. }
  18. // Applies styles for users in high contrast mode. Note that this only applies
  19. // to Microsoft browsers. Chrome can be included by checking for the `html[hc]`
  20. // attribute, however Chrome handles high contrast differently.
  21. //
  22. // @param target Which kind of high contrast setting to target. Defaults to `active`, can be
  23. // `white-on-black` or `black-on-white`.
  24. @mixin cdk-high-contrast($target: active) {
  25. @media (-ms-high-contrast: $target) {
  26. @content;
  27. }
  28. }