skip-link.pcss.css

Same filename in this branch
  1. main core/themes/olivero/css/components/skip-link.pcss.css
  2. main core/themes/claro/css/components/skip-link.pcss.css
  3. main core/themes/admin/css/components/skip-link.pcss.css
Same filename and directory in other branches
  1. 10 core/themes/olivero/css/components/skip-link.pcss.css
  2. 10 core/themes/claro/css/components/skip-link.pcss.css
  3. 11.x core/themes/olivero/css/components/skip-link.pcss.css
  4. 11.x core/themes/claro/css/components/skip-link.pcss.css
  5. 9 core/themes/olivero/css/components/skip-link.pcss.css
  6. 9 core/themes/claro/css/components/skip-link.pcss.css
  7. 8.9.x core/themes/claro/css/components/skip-link.pcss.css
  8. 11.x core/themes/admin/css/components/skip-link.pcss.css
  9. 11.x core/themes/default_admin/css/components/skip-link.pcss.css

Skip link

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

File

core/themes/default_admin/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. /* Dark chrome pill with light text — kept on the gray ramp directly: no
  9. semantic surface token matches these mid/near-black bg values, and the skip
  10. link is a self-contained always-dark component (not mode-aware). */
  11. --skip-link-bg-color: var(--admin-color-gray-800);
  12. --skip-link-color: var(--admin-color-white); /* Fixed: light text on the always-dark pill. */
  13. --skip-link-active-bg-color: var(--admin-color-gray-950);
  14. }
  15. .skip-link {
  16. z-index: 503;
  17. top: 0;
  18. left: 0; /* LTR */
  19. padding: 1px 10px 2px;
  20. color: var(--skip-link-color);
  21. border-radius: 0 0 10px 0; /* LTR */
  22. background: var(--skip-link-bg-color);
  23. box-shadow:
  24. 0 0 0 2px var(--admin-color-bg-surface),
  25. 0 0 0 5px var(--admin-color-focus);
  26. font-size: 0.94em;
  27. &:hover,
  28. &:active {
  29. color: var(--skip-link-color);
  30. background-color: var(--skip-link-active-bg-color);
  31. }
  32. &:focus {
  33. text-decoration: none;
  34. }
  35. &.visually-hidden.focusable:focus {
  36. position: absolute !important;
  37. }
  38. }
  39. [dir="rtl"] .skip-link {
  40. right: 0;
  41. left: auto;
  42. border-radius: 0 0 0 10px;
  43. }

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