Нема описа

links.scss 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * text-underline-offset doesn't work in Chrome at all 👎
  3. * But looks nice in Safari/Firefox, so let's keep it and
  4. * maybe Chrome will support it soon.
  5. */
  6. a {
  7. cursor: pointer;
  8. color: var(--wp--style--color--link, var(--global--color-primary));
  9. text-underline-offset: 3px;
  10. text-decoration-skip-ink: all;
  11. }
  12. a:hover {
  13. text-decoration-style: dotted;
  14. text-decoration-skip-ink: none;
  15. }
  16. .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) {
  17. /* Only visible in Windows High Contrast mode */
  18. outline: 2px solid transparent;
  19. text-decoration: underline 1px dotted currentColor;
  20. text-decoration-skip-ink: none;
  21. background: rgba(255, 255, 255, .9);
  22. // Change text color when the body background is dark.
  23. .is-dark-theme & {
  24. background: var(--global--color-black);
  25. color: var(--global--color-white);
  26. text-decoration: none;
  27. .meta-nav {
  28. color: var(--wp--style--color--link, var(--global--color-white));
  29. }
  30. }
  31. // Change colors when the body background is white.
  32. .has-background-white & {
  33. background: rgba(0, 0, 0, .9);
  34. color: var(--wp--style--color--link, var(--global--color-white));
  35. .meta-nav {
  36. color: var(--wp--style--color--link, var(--global--color-white));
  37. }
  38. }
  39. &.skip-link {
  40. /* Only visible in Windows High Contrast mode */
  41. outline: 2px solid transparent;
  42. outline-offset: -2px;
  43. &:focus {
  44. color: #21759b;
  45. background-color: #f1f1f1;
  46. }
  47. }
  48. &.custom-logo-link {
  49. background: none;
  50. }
  51. img {
  52. outline: 2px dotted var(--wp--style--color--link, var(--global--color-primary));
  53. }
  54. }
  55. // Enforce the custom link color even if a custom background color has been set.
  56. // The extra specificity here is required to override the background color styles.
  57. .has-background {
  58. // Target both current level and nested block.
  59. .has-link-color a,
  60. &.has-link-color a {
  61. color: var(--wp--style--color--link, var(--global--color-primary));
  62. }
  63. }