skip-link.pcss.css

Same filename in this branch
  1. 11.x core/themes/olivero/css/components/skip-link.pcss.css
Same filename in other branches
  1. 9 core/themes/olivero/css/components/skip-link.pcss.css
  2. 9 core/themes/claro/css/components/skip-link.pcss.css
  3. 8.9.x core/themes/claro/css/components/skip-link.pcss.css
  4. 10 core/themes/olivero/css/components/skip-link.pcss.css
  5. 10 core/themes/claro/css/components/skip-link.pcss.css

Skip link

Allows keyboard users to quickly skip to the main content of the page.

File

core/themes/claro/css/components/skip-link.pcss.css

View source
  1. /**
  2. * @file
  3. * Skip link
  4. *
  5. * Allows keyboard users to quickly skip to the main content of the page.
  6. */
  7. :root {
  8. --skip-link-bg-color: var(--color-gray-800);
  9. --skip-link-color: var(--color-white);
  10. --skip-link-active-bg-color: var(--color-gray);
  11. }
  12. .skip-link {
  13. z-index: 503;
  14. top: 0;
  15. left: 0; /* LTR */
  16. padding: 1px 10px 2px;
  17. color: var(--skip-link-color);
  18. border-radius: 0 0 10px 0; /* LTR */
  19. background: var(--skip-link-bg-color);
  20. box-shadow:
  21. 0 0 0 2px var(--color-white),
  22. 0 0 0 5px var(--color-focus);
  23. font-size: 0.94em;
  24. &:hover,
  25. &:active {
  26. color: var(--skip-link-color);
  27. background-color: var(--skip-link-active-bg-color);
  28. }
  29. &:focus {
  30. text-decoration: none;
  31. }
  32. &.visually-hidden.focusable:focus {
  33. position: absolute !important;
  34. }
  35. }
  36. [dir="rtl"] .skip-link {
  37. right: 0;
  38. left: auto;
  39. border-radius: 0 0 0 10px;
  40. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.