accessibility.css 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. :where(*:focus-visible) {
  2. outline: 3px solid #000000;
  3. outline-offset: 3px;
  4. }
  5. .sr-only {
  6. position: absolute;
  7. width: 1px;
  8. height: 1px;
  9. padding: 0;
  10. margin: -1px;
  11. overflow: hidden;
  12. clip: rect(0, 0, 0, 0);
  13. white-space: nowrap;
  14. /* added line */
  15. border: 0;
  16. }
  17. .skip-to-content {
  18. position: fixed;
  19. z-index: 9999;
  20. border-radius: 8px;
  21. background-color: hsl(var(--clr-darker-hsl));
  22. color: hsl(var(--clr-light-hsl));
  23. padding: 0.5em 1em;
  24. margin-inline: auto;
  25. text-decoration: none;
  26. transform: translateY(calc(-100% - 5rem - 1px));
  27. transition: transform 0.25s ease-in;
  28. top: 1.5rem;
  29. left: 0;
  30. right: 0;
  31. margin: 0 auto !important; /* override .button styles */
  32. max-width: max-content;
  33. display: block;
  34. opacity: 0;
  35. outline-offset: 1px;
  36. }
  37. .skip-to-content:hover {
  38. background-color: hsl(var(--clr-light-hsl));
  39. color: hsl(var(--clr-darker-hsl));
  40. }
  41. .skip-to-content:focus {
  42. transform: translateY(0);
  43. opacity: 1;
  44. }
  45. @media (prefers-reduced-motion: reduce) {
  46. *, *::before, *::after {
  47. animation-duration: 0.1ms !important;
  48. animation-iteration-count: 1 !important;
  49. transition-duration: auto !important;
  50. scroll-behavior: auto !important;
  51. }
  52. .animate {
  53. animation: none !important;
  54. }
  55. }