From 9d4ea505b16d352247dbc42cfa00957c71f89b02 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 29 Sep 2025 15:56:57 -0400 Subject: [PATCH] Add dark mode styling for Contents section in post pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed Contents section links and parent navigation being hard to read in dark mode by adding proper dark mode styles for headers, links, borders, and hover states. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- tuftecms/templates/post.html | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tuftecms/templates/post.html b/tuftecms/templates/post.html index 64be39a..280185b 100644 --- a/tuftecms/templates/post.html +++ b/tuftecms/templates/post.html @@ -202,6 +202,34 @@ background-color: #dcfce7 !important; } + body.light-mode .directory-listing { + border-top-color: #eee !important; + } + + body.light-mode .directory-listing h2 { + color: #111 !important; + } + + body.light-mode .items-list a { + color: #333 !important; + } + + body.light-mode .items-list a:hover { + color: #000 !important; + } + + body.light-mode .parent-navigation { + border-top-color: #eee !important; + } + + body.light-mode .parent-link { + color: #666 !important; + } + + body.light-mode .parent-link:hover { + color: #333 !important; + } + body.dark-mode article h1 { color: #e5e5e5; } @@ -237,6 +265,34 @@ background-color: #1a3d1a; } + body.dark-mode .directory-listing { + border-top-color: #2a2a2a; + } + + body.dark-mode .directory-listing h2 { + color: #e5e5e5; + } + + body.dark-mode .items-list a { + color: #ccc; + } + + body.dark-mode .items-list a:hover { + color: #fff; + } + + body.dark-mode .parent-navigation { + border-top-color: #2a2a2a; + } + + body.dark-mode .parent-link { + color: #999; + } + + body.dark-mode .parent-link:hover { + color: #ccc; + } + @media (prefers-color-scheme: dark) { article h1 { color: #e5e5e5;