From 2236d07a5247cab38e0e6b524bdfb26c12c143a8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 21 Apr 2026 18:46:11 +0200 Subject: fix: improve badge text color contrast for WCAG AA compliance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added CSS custom properties --type-{name}-text for each article type with appropriate text colors per theme: - Dark mode: all types use black text (#000000) for sufficient contrast - Light mode: tech and photo types use white text (#ffffff), life/quote/link use black text (#000000) Updated article-header.html and article-card.html to use color: var(--type-{name}-text) instead of hardcoded text-white class. Improves contrast ratios: - Quote type dark mode: 1.34:1 → 15.66:1 (white on #00ff88 was failing WCAG AA) - All other types now pass 4.5:1 minimum for WCAG AA small text Co-Authored-By: Claude Haiku 4.5 --- themes/danix-xyz-hacker/layouts/partials/article-header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/danix-xyz-hacker/layouts/partials/article-header.html') diff --git a/themes/danix-xyz-hacker/layouts/partials/article-header.html b/themes/danix-xyz-hacker/layouts/partials/article-header.html index 63b2a97..94c78a5 100644 --- a/themes/danix-xyz-hacker/layouts/partials/article-header.html +++ b/themes/danix-xyz-hacker/layouts/partials/article-header.html @@ -63,7 +63,7 @@ {{ if and $typeData $hasType }} - + {{ i18n $articleType }} {{ end }} -- cgit v1.2.3