From 7b83f96e49eeb871c6b0c743ced95103ad80713b Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Wed, 20 May 2026 07:47:55 -0700 Subject: [PATCH] Prevent visited docs links from changing color. PiperOrigin-RevId: 918445755 Change-Id: I4884c7f349ef39fab2678ba68eae422e6140b0a2 --- doc/conf.py | 2 ++ doc/css/theme_overrides.css | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index c3cdfd37..b7ad83b1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -168,6 +168,7 @@ SHARED_CSS_VARIABLES = { # font-stack--monospace used in code blocks, Inconsolata fits in 100 chars. html_theme_options = { 'light_css_variables': { + 'color-brand-visited': 'var(--color-brand-content)', 'font-stack--monospace': 'Inconsolata,Consolas,ui-monospace,monospace', 'at-color': '#830b2b', 'at-val-color': '#bc103e', @@ -182,6 +183,7 @@ html_theme_options = { 'wy-nav-side-background-color': '#0053d6', }, 'dark_css_variables': { + 'color-brand-visited': 'var(--color-brand-content)', 'at-color': '#ffaab7', 'at-val-color': '#ff95a6', 'body-color': '#14234b', diff --git a/doc/css/theme_overrides.css b/doc/css/theme_overrides.css index a7318056..3c888606 100644 --- a/doc/css/theme_overrides.css +++ b/doc/css/theme_overrides.css @@ -197,11 +197,6 @@ h4 { padding: 6px; } -/* Don't change color of visited links. -.rst-content a.reference:visited { - color: var(--rst-content-a-color); -} */ - .rst-content code, .rst-content tt { font-size: 90%; padding: inherit;