From 1006b1a1f0d991f7246b216959725b0ec6a94b01 Mon Sep 17 00:00:00 2001 From: Jure <44338+hoornet@users.noreply.github.com> Date: Thu, 2 Apr 2026 17:33:59 +0200 Subject: [PATCH] Normalize theme tokens: accent-text, zap-text, remove hard-coded colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add accent-text and zap-text tokens to all 7 themes for proper contrast on accent/zap-colored buttons (fixes white-on-light-accent in Catppuccin, Nord Frost, Hackerman, Sepia, Gruvbox) - Replace text-white → text-accent-text on all accent buttons (20+ instances) - Replace text-white → text-zap-text on zap buttons - Replace hover:text-white → hover:text-accent-text on follow/action buttons - Replace bg-blue-500 → bg-accent in FountainCard (theme-aware) - Remaining text-white is correct: overlays on bg-black, danger badges --- src/components/article/ArticleEditor.tsx | 4 ++-- src/components/article/ArticleFeed.tsx | 2 +- src/components/article/ArticleView.tsx | 2 +- src/components/dm/DMView.tsx | 2 +- src/components/feed/ComposeBox.tsx | 2 +- src/components/feed/FountainCard.tsx | 8 ++++---- src/components/feed/InlineReplyBox.tsx | 2 +- src/components/feed/QuoteModal.tsx | 2 +- src/components/follows/FollowsView.tsx | 2 +- src/components/onboarding/OnboardingFlow.tsx | 8 ++++---- src/components/profile/EditProfileForm.tsx | 2 +- src/components/profile/ProfileView.tsx | 2 +- src/components/search/SearchView.tsx | 4 ++-- src/components/shared/AboutView.tsx | 2 +- src/components/shared/LoginModal.tsx | 4 ++-- src/components/shared/NWCWizard.tsx | 2 +- src/components/thread/ThreadNode.tsx | 2 +- src/components/thread/ThreadView.tsx | 2 +- src/components/zap/ZapModal.tsx | 4 ++-- src/index.css | 2 ++ src/lib/themes.ts | 16 ++++++++++++++++ 21 files changed, 47 insertions(+), 29 deletions(-) diff --git a/src/components/article/ArticleEditor.tsx b/src/components/article/ArticleEditor.tsx index e0680cd..a7a66cb 100644 --- a/src/components/article/ArticleEditor.tsx +++ b/src/components/article/ArticleEditor.tsx @@ -328,7 +328,7 @@ export function ArticleEditor() { @@ -493,7 +493,7 @@ function DraftListView({ onNewDraft }: { onNewDraft: () => void }) { diff --git a/src/components/article/ArticleFeed.tsx b/src/components/article/ArticleFeed.tsx index 459570c..88340b4 100644 --- a/src/components/article/ArticleFeed.tsx +++ b/src/components/article/ArticleFeed.tsx @@ -68,7 +68,7 @@ export function ArticleFeed() {

Articles

diff --git a/src/components/article/ArticleView.tsx b/src/components/article/ArticleView.tsx index d8326b6..75b49aa 100644 --- a/src/components/article/ArticleView.tsx +++ b/src/components/article/ArticleView.tsx @@ -456,7 +456,7 @@ export function ArticleView() { {loggedIn && ( diff --git a/src/components/dm/DMView.tsx b/src/components/dm/DMView.tsx index e12c14f..53de155 100644 --- a/src/components/dm/DMView.tsx +++ b/src/components/dm/DMView.tsx @@ -220,7 +220,7 @@ function ThreadPanel({ diff --git a/src/components/feed/ComposeBox.tsx b/src/components/feed/ComposeBox.tsx index 28c8fc2..7df2594 100644 --- a/src/components/feed/ComposeBox.tsx +++ b/src/components/feed/ComposeBox.tsx @@ -313,7 +313,7 @@ export function ComposeBox({ onPublished, onNoteInjected }: { onPublished?: () = diff --git a/src/components/feed/FountainCard.tsx b/src/components/feed/FountainCard.tsx index f422680..126ddcc 100644 --- a/src/components/feed/FountainCard.tsx +++ b/src/components/feed/FountainCard.tsx @@ -27,8 +27,8 @@ export function FountainCard({ seg }: { seg: ContentSegment }) { rel="noopener noreferrer" className="mt-2 flex items-center gap-3 rounded-sm bg-bg-raised border border-border p-3 hover:bg-bg-hover transition-colors cursor-pointer" > -
- F +
+ F
Fountain.fm
@@ -74,8 +74,8 @@ export function FountainCard({ seg }: { seg: ContentSegment }) { onError={(e) => { (e.target as HTMLImageElement).style.display = "none"; }} /> ) : ( -
- F +
+ F
)}
diff --git a/src/components/feed/InlineReplyBox.tsx b/src/components/feed/InlineReplyBox.tsx index 26e58ff..df2c88e 100644 --- a/src/components/feed/InlineReplyBox.tsx +++ b/src/components/feed/InlineReplyBox.tsx @@ -228,7 +228,7 @@ export function InlineReplyBox({ event, name, rootEvent }: InlineReplyBoxProps) diff --git a/src/components/feed/QuoteModal.tsx b/src/components/feed/QuoteModal.tsx index d756b45..c8ca06b 100644 --- a/src/components/feed/QuoteModal.tsx +++ b/src/components/feed/QuoteModal.tsx @@ -93,7 +93,7 @@ export function QuoteModal({ event, authorName, authorAvatar, onClose, onPublish diff --git a/src/components/follows/FollowsView.tsx b/src/components/follows/FollowsView.tsx index 5e2d484..d91f31d 100644 --- a/src/components/follows/FollowsView.tsx +++ b/src/components/follows/FollowsView.tsx @@ -74,7 +74,7 @@ function FollowRow({ className={`shrink-0 px-3 py-1 text-[11px] transition-colors ${ isFollowing ? "text-text-dim border border-border hover:text-danger hover:border-danger" - : "bg-accent hover:bg-accent-hover text-white" + : "bg-accent hover:bg-accent-hover text-accent-text" }`} > {isFollowing ? "unfollow" : "follow"} diff --git a/src/components/onboarding/OnboardingFlow.tsx b/src/components/onboarding/OnboardingFlow.tsx index 2f19df4..f5902f5 100644 --- a/src/components/onboarding/OnboardingFlow.tsx +++ b/src/components/onboarding/OnboardingFlow.tsx @@ -47,7 +47,7 @@ function WelcomeStep({ onCreateNew, onHaveKey }: { onCreateNew: () => void; onHa
@@ -101,7 +101,7 @@ function CreateStep({ onNext }: { onNext: (signer: NDKPrivateKeySigner) => void @@ -185,7 +185,7 @@ function BackupStep({ signer, onComplete }: { signer: NDKPrivateKeySigner; onCom @@ -267,7 +267,7 @@ function LoginStep({ onBack, onComplete }: { onBack: () => void; onComplete: () diff --git a/src/components/profile/EditProfileForm.tsx b/src/components/profile/EditProfileForm.tsx index 89ac3c8..3318f82 100644 --- a/src/components/profile/EditProfileForm.tsx +++ b/src/components/profile/EditProfileForm.tsx @@ -87,7 +87,7 @@ export function EditProfileForm({ pubkey, onSaved }: { pubkey: string; onSaved: diff --git a/src/components/profile/ProfileView.tsx b/src/components/profile/ProfileView.tsx index a138c65..b9163db 100644 --- a/src/components/profile/ProfileView.tsx +++ b/src/components/profile/ProfileView.tsx @@ -176,7 +176,7 @@ export function ProfileView() { className={`text-[11px] px-3 py-1 border transition-colors disabled:opacity-40 disabled:cursor-not-allowed ${ isFollowing ? "border-border text-text-muted hover:text-danger hover:border-danger/40" - : "border-accent/60 text-accent hover:bg-accent hover:text-white" + : "border-accent/60 text-accent hover:bg-accent hover:text-accent-text" }`} > {followPending ? "…" : isFollowing ? "unfollow" : "follow"} diff --git a/src/components/search/SearchView.tsx b/src/components/search/SearchView.tsx index c330283..39881d5 100644 --- a/src/components/search/SearchView.tsx +++ b/src/components/search/SearchView.tsx @@ -74,7 +74,7 @@ function UserRow({ user }: { user: ParsedUser }) { className={`text-[11px] px-3 py-1 border transition-colors shrink-0 disabled:opacity-40 disabled:cursor-not-allowed ${ isFollowing ? "border-border text-text-muted hover:text-danger hover:border-danger/40" - : "border-accent/60 text-accent hover:bg-accent hover:text-white" + : "border-accent/60 text-accent hover:bg-accent hover:text-accent-text" }`} > {pending ? "…" : isFollowing ? "unfollow" : "follow"} @@ -114,7 +114,7 @@ function SuggestionFollowButton({ pubkey }: { pubkey: string }) { className={`text-[11px] px-3 py-1 border transition-colors shrink-0 disabled:opacity-40 disabled:cursor-not-allowed ${ isFollowing ? "border-border text-text-muted hover:text-danger hover:border-danger/40" - : "border-accent/60 text-accent hover:bg-accent hover:text-white" + : "border-accent/60 text-accent hover:bg-accent hover:text-accent-text" }`} > {pending ? "..." : isFollowing ? "unfollow" : "follow"} diff --git a/src/components/shared/AboutView.tsx b/src/components/shared/AboutView.tsx index 3fddaab..c891d67 100644 --- a/src/components/shared/AboutView.tsx +++ b/src/components/shared/AboutView.tsx @@ -65,7 +65,7 @@ export function AboutView() {

diff --git a/src/components/shared/LoginModal.tsx b/src/components/shared/LoginModal.tsx index 80716d6..51dfe88 100644 --- a/src/components/shared/LoginModal.tsx +++ b/src/components/shared/LoginModal.tsx @@ -69,7 +69,7 @@ function NewAccountTab({ onClose }: { onClose: () => void }) { @@ -197,7 +197,7 @@ export function LoginModal({ onClose }: LoginModalProps) { diff --git a/src/components/thread/ThreadNode.tsx b/src/components/thread/ThreadNode.tsx index 244f778..9ff5825 100644 --- a/src/components/thread/ThreadNode.tsx +++ b/src/components/thread/ThreadNode.tsx @@ -99,7 +99,7 @@ function InlineThreadReply({ replyTo, rootEvent, onPublished }: { diff --git a/src/components/thread/ThreadView.tsx b/src/components/thread/ThreadView.tsx index 73af15e..eec5a99 100644 --- a/src/components/thread/ThreadView.tsx +++ b/src/components/thread/ThreadView.tsx @@ -248,7 +248,7 @@ export function ThreadView() { diff --git a/src/components/zap/ZapModal.tsx b/src/components/zap/ZapModal.tsx index 03c9732..6554318 100644 --- a/src/components/zap/ZapModal.tsx +++ b/src/components/zap/ZapModal.tsx @@ -68,7 +68,7 @@ export function ZapModal({ target, recipientName, onClose }: ZapModalProps) {

@@ -123,7 +123,7 @@ export function ZapModal({ target, recipientName, onClose }: ZapModalProps) { diff --git a/src/index.css b/src/index.css index 5af2906..6b80b51 100644 --- a/src/index.css +++ b/src/index.css @@ -11,7 +11,9 @@ --color-text-dim: #555555; --color-accent: #8b5cf6; --color-accent-hover: #7c3aed; + --color-accent-text: #ffffff; --color-zap: #f59e0b; + --color-zap-text: #000000; --color-danger: #ef4444; --color-warning: #f59e0b; --color-success: #22c55e; diff --git a/src/lib/themes.ts b/src/lib/themes.ts index f78bde4..0c6052b 100644 --- a/src/lib/themes.ts +++ b/src/lib/themes.ts @@ -9,7 +9,9 @@ interface ThemeColors { "text-dim": string; accent: string; "accent-hover": string; + "accent-text": string; zap: string; + "zap-text": string; danger: string; warning: string; success: string; @@ -36,7 +38,9 @@ export const themes: Theme[] = [ "text-dim": "#555555", accent: "#8b5cf6", "accent-hover": "#7c3aed", + "accent-text": "#ffffff", zap: "#f59e0b", + "zap-text": "#000000", danger: "#ef4444", warning: "#f59e0b", success: "#22c55e", @@ -56,7 +60,9 @@ export const themes: Theme[] = [ "text-dim": "#9ca3af", accent: "#7c3aed", "accent-hover": "#6d28d9", + "accent-text": "#ffffff", zap: "#d97706", + "zap-text": "#ffffff", danger: "#dc2626", warning: "#d97706", success: "#16a34a", @@ -76,7 +82,9 @@ export const themes: Theme[] = [ "text-dim": "#6c7086", accent: "#cba6f7", "accent-hover": "#b4befe", + "accent-text": "#1e1e2e", zap: "#f9e2af", + "zap-text": "#1e1e2e", danger: "#f38ba8", warning: "#f9e2af", success: "#a6e3a1", @@ -96,7 +104,9 @@ export const themes: Theme[] = [ "text-dim": "#7a6452", accent: "#e09850", "accent-hover": "#c47f3a", + "accent-text": "#2b2018", zap: "#f0c040", + "zap-text": "#2b2018", danger: "#d45040", warning: "#e0a040", success: "#7ab860", @@ -116,7 +126,9 @@ export const themes: Theme[] = [ "text-dim": "#665c54", accent: "#fe8019", "accent-hover": "#d65d0e", + "accent-text": "#282828", zap: "#fabd2f", + "zap-text": "#282828", danger: "#fb4934", warning: "#fabd2f", success: "#b8bb26", @@ -136,7 +148,9 @@ export const themes: Theme[] = [ "text-dim": "#7b88a1", accent: "#88c0d0", "accent-hover": "#81a1c1", + "accent-text": "#2e3440", zap: "#ebcb8b", + "zap-text": "#2e3440", danger: "#bf616a", warning: "#ebcb8b", success: "#a3be8c", @@ -156,7 +170,9 @@ export const themes: Theme[] = [ "text-dim": "#006b1a", accent: "#00ff41", "accent-hover": "#33ff66", + "accent-text": "#0a0a0a", zap: "#ffff00", + "zap-text": "#0a0a0a", danger: "#ff0000", warning: "#ffff00", success: "#00ff41",