summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker/assets/css/main.min.css
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-21 18:46:11 +0200
committerDanilo M. <danix@danix.xyz>2026-04-21 18:46:11 +0200
commit2236d07a5247cab38e0e6b524bdfb26c12c143a8 (patch)
tree1a6a1d0e86ca22b800a971e499fdee13fe203f78 /themes/danix-xyz-hacker/assets/css/main.min.css
parent8e16e9f4665f2537225f1d21668c6a8002745770 (diff)
downloaddanixxyz-2236d07a5247cab38e0e6b524bdfb26c12c143a8.tar.gz
danixxyz-2236d07a5247cab38e0e6b524bdfb26c12c143a8.zip
fix: improve badge text color contrast for WCAG AA compliance
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 <noreply@anthropic.com>
Diffstat (limited to 'themes/danix-xyz-hacker/assets/css/main.min.css')
-rw-r--r--themes/danix-xyz-hacker/assets/css/main.min.css26
1 files changed, 26 insertions, 0 deletions
diff --git a/themes/danix-xyz-hacker/assets/css/main.min.css b/themes/danix-xyz-hacker/assets/css/main.min.css
index 362d7df..8604392 100644
--- a/themes/danix-xyz-hacker/assets/css/main.min.css
+++ b/themes/danix-xyz-hacker/assets/css/main.min.css
@@ -2583,6 +2583,10 @@ article.border.border-border\/30.rounded-lg.timeline-thumb.group.bg-bg {
white-space: nowrap;
}
+.whitespace-nowrap {
+ white-space: nowrap;
+}
+
.rounded {
border-radius: 0.25rem;
}
@@ -2695,6 +2699,11 @@ article.border.border-border\/30.rounded-lg.timeline-thumb.group.bg-bg {
padding-right: 0.5rem;
}
+.px-2\.5 {
+ padding-left: 0.625rem;
+ padding-right: 0.625rem;
+}
+
.px-3 {
padding-left: 0.75rem;
padding-right: 0.75rem;
@@ -3013,6 +3022,12 @@ article.border.border-border\/30.rounded-lg.timeline-thumb.group.bg-bg {
--type-quote: #00ff88;
--type-link: #38bdf8;
--type-photo: #ec4899;
+ /* Article type text colors - dark (all black for WCAG AA) */
+ --type-tech-text: #000000;
+ --type-life-text: #000000;
+ --type-quote-text: #000000;
+ --type-link-text: #000000;
+ --type-photo-text: #000000;
}
/* Light theme overrides */
@@ -3037,6 +3052,12 @@ html.theme-light {
--type-quote: #008f5a;
--type-link: #0284c7;
--type-photo: #be185d;
+ /* Article type text colors - light (mixed for WCAG AA) */
+ --type-tech-text: #ffffff;
+ --type-life-text: #000000;
+ --type-quote-text: #000000;
+ --type-link-text: #000000;
+ --type-photo-text: #ffffff;
}
/* No-JS fallback: prefers-color-scheme light */
@@ -3061,6 +3082,11 @@ html.theme-light {
--type-quote: #008f5a;
--type-link: #0284c7;
--type-photo: #be185d;
+ --type-tech-text: #ffffff;
+ --type-life-text: #000000;
+ --type-quote-text: #000000;
+ --type-link-text: #000000;
+ --type-photo-text: #ffffff;
}
}