From 29839fbad99deafae9cb5728a6931ba6b50b79bc Mon Sep 17 00:00:00 2001 From: Claas Augner <495429+caugner@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:54:21 +0100 Subject: [PATCH] fix(links): adopt visited link colors from Firefox (#9961) Ensures that visited links are readable in all browsers, including Safari. --- client/src/document/index.scss | 2 +- client/src/ui/base/_themes.scss | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/document/index.scss b/client/src/document/index.scss index 4754fcfe9c33..9e4567e93116 100644 --- a/client/src/document/index.scss +++ b/client/src/document/index.scss @@ -67,7 +67,7 @@ &:visited:not([href^="#"]) { // Distinguish visited links (excl. anchor links). - color: revert; + color: var(--text-visited); } &:active, diff --git a/client/src/ui/base/_themes.scss b/client/src/ui/base/_themes.scss index 9e25e0012c0b..1f9bfb7db77c 100644 --- a/client/src/ui/base/_themes.scss +++ b/client/src/ui/base/_themes.scss @@ -7,6 +7,7 @@ --text-secondary: #{$mdn-theme-light-text-secondary}; --text-inactive: #{$mdn-theme-light-text-inactive}; --text-link: #{$mdn-theme-light-text-link}; + --text-visited: #551a8b; // Source: https://searchfox.org/mozilla-central/rev/02841791400cf7cf5760c0cfaf31f5d772624253/modules/libpref/init/StaticPrefList.yaml#1787-1790 --text-invert: #{$mdn-theme-light-text-invert}; --background-primary: #{$mdn-theme-light-background-primary}; @@ -205,6 +206,7 @@ --text-secondary: #{$mdn-theme-dark-text-secondary}; --text-inactive: #{$mdn-theme-dark-text-inactive}; --text-link: #{$mdn-theme-dark-text-link}; + --text-visited: #ffadff; // Source: https://searchfox.org/mozilla-central/rev/02841791400cf7cf5760c0cfaf31f5d772624253/modules/libpref/init/StaticPrefList.yaml#1794-1797 --text-invert: #{$mdn-theme-dark-text-invert}; --background-primary: #{$mdn-theme-dark-background-primary};