From 6a66f7b5bf0a8a1a44ec9f4f21e54096cbac14aa Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Fri, 5 Jun 2026 09:15:31 +0000 Subject: [PATCH] fixes end note citation color in dark mode --- developer/authored/RT/element/citation.js | 3 +-- developer/authored/RT/theme/dark_gold.js | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/developer/authored/RT/element/citation.js b/developer/authored/RT/element/citation.js index 5c725f6..857862e 100644 --- a/developer/authored/RT/element/citation.js +++ b/developer/authored/RT/element/citation.js @@ -35,8 +35,7 @@ window.StyleRT.citation = function(){ const refNum = index + 1; const refText = cite.getAttribute('ref') || cite.innerHTML; - // Transform the inline tag into a superscript link - cite.innerHTML = `[${refNum}]`; + cite.innerHTML = `[${refNum}]`; cite.style.cursor = 'pointer'; cite.style.color = 'var(--rt-brand-link)'; cite.style.textDecoration = 'none'; diff --git a/developer/authored/RT/theme/dark_gold.js b/developer/authored/RT/theme/dark_gold.js index f576147..77eb67a 100644 --- a/developer/authored/RT/theme/dark_gold.js +++ b/developer/authored/RT/theme/dark_gold.js @@ -69,6 +69,7 @@ s.setProperty(`--rt-${key.replace(/_/g, '-')}`, value); } + // 3. Global Overrides const style_id = 'rt-global-overrides'; if (!document.getElementById(style_id)) { @@ -86,7 +87,27 @@ border-radius: 8px; } ::-webkit-scrollbar-thumb:hover { background: var(--rt-brand-secondary); } + + /* --- Citation & Endnote Styling --- */ + rt-cite a, .rt-inline-cite a, rt-endnotes a { + color: var(--rt-brand-link); + text-decoration: none; + } + rt-cite a:hover, .rt-inline-cite a:hover, rt-endnotes a:hover { + text-decoration: underline; + } + rt-cite, .rt-inline-cite { + font-size: 1em; + vertical-align: baseline; + padding: 0 0.15em; + } + + /* --- Image Inversion for Diagrams --- */ + img.rt-diagram { + filter: invert(1) hue-rotate(180deg); + } `; + document.head.appendChild(style); } }; -- 2.20.1