From c3aa0eb3fe7b94ee766dfa2ba327efc6a4fec437 Mon Sep 17 00:00:00 2001 From: Eric Boehs Date: Sat, 29 Aug 2026 22:56:07 -0500 Subject: [PATCH] fix: restore ordinary points to white, tint only the high-score highlight Tinting every point flattened the distinction light mode draws between an ordinary score and one above the next threshold. Dropping the blanket .points rule lets ordinary points fall back to exactly what they rendered before any of this: UIkit's .uk-light white, and grey once visited via the global `table a:visited`. The explicit visited rule goes with it. It was only needed because the blanket rule outranked that global one; without it the original cascade applies unchanged. Dark mode now mirrors light mode's structure rather than inventing its own. Verified in the browser -- dark: ordinary points rgb(255,255,255) matching the titles, high-score rgb(88,166,255). Light: unchanged at rgb(13,13,13) and rgb(30,135,240). --- views/layout.erb | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/views/layout.erb b/views/layout.erb index 4e181aa..e254549 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -48,22 +48,15 @@ /* Pure black rather than #222 so OLED pixels switch off entirely. */ html.hn-dark, html.hn-dark body { background-color: #000 } - /* Only the points are tinted. Unvisited titles keep UIkit's - .uk-light white; visited ones stay grey via `table a:visited` - above. #58a6ff measures 8.3:1 on black (WCAG AAA); UIkit's own - #1e87f0 only reaches 5.8:1. */ - .hn-dark .uk-light .points { color: #58a6ff } - - /* .uk-light forces .uk-text-primary to #fff !important, so the - high-score variant has to be reclaimed with !important too. */ + /* Only the high-score highlight is tinted; ordinary points fall back + to UIkit's .uk-light white, and to grey once visited via the global + `table a:visited`. .uk-light forces .uk-text-primary to #fff + !important, so reclaiming it needs !important too. #58a6ff measures + 8.3:1 on black (WCAG AAA); UIkit's own #1e87f0 only reaches 5.8:1. + Like light mode, the highlight ignores visited dimming, because + that !important outranks the global visited rule. */ .hn-dark .uk-light .points.uk-text-primary { color: #58a6ff !important } - /* Keeps visited points grey: the two rules above are more specific - than the global `table a:visited` and would otherwise outrank it, - so clicked stories would stop dimming in dark mode only. Declared - last so it also beats the equally-specific !important rule. */ - .hn-dark .uk-light .points:visited { color: #999 !important } - /* #DDD thread borders measure 15:1 on black, louder than the text they sit beside. */ .hn-dark .uk-comment-list li { border-left-color: #2a2a2a }