Skip to content

Commit 32c62d6

Browse files
GeneAIclaude
andcommitted
fix: Improve text contrast on dark gradient backgrounds
Fixed contrast issues where headings appeared black on dark blue/purple gradient backgrounds, making them difficult to read. Changes to app/globals.css: - Added CSS rules to force white color for h1-h6 on gradient backgrounds - Headings in .gradient-primary now display white text - Headings in .gradient-accent now display white text - Headings in .text-white sections now display white text - Headings in .bg-primary sections now display white text - Headings in .bg-accent sections now display white text - Added .dark-bg utility class for easy dark background styling Impact: - CTA section with gradient-primary background now has white headings - Any section with text-white class now has proper white headings - Improved accessibility and readability on all dark backgrounds - Better WCAG contrast compliance Build verified successful with all 23 routes generated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 168cd0e commit 32c62d6

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

website/app/globals.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,40 @@ h1, h2, h3, h4, h5, h6 {
104104
letter-spacing: -0.02em;
105105
}
106106

107+
/* Headings on dark/gradient backgrounds should be white */
108+
.gradient-primary h1,
109+
.gradient-primary h2,
110+
.gradient-primary h3,
111+
.gradient-primary h4,
112+
.gradient-primary h5,
113+
.gradient-primary h6,
114+
.gradient-accent h1,
115+
.gradient-accent h2,
116+
.gradient-accent h3,
117+
.gradient-accent h4,
118+
.gradient-accent h5,
119+
.gradient-accent h6,
120+
.text-white h1,
121+
.text-white h2,
122+
.text-white h3,
123+
.text-white h4,
124+
.text-white h5,
125+
.text-white h6,
126+
.bg-primary h1,
127+
.bg-primary h2,
128+
.bg-primary h3,
129+
.bg-primary h4,
130+
.bg-primary h5,
131+
.bg-primary h6,
132+
.bg-accent h1,
133+
.bg-accent h2,
134+
.bg-accent h3,
135+
.bg-accent h4,
136+
.bg-accent h5,
137+
.bg-accent h6 {
138+
color: white !important;
139+
}
140+
107141
h1 {
108142
font-size: 3.5rem;
109143
}
@@ -157,6 +191,21 @@ pre code {
157191
background-clip: text;
158192
}
159193

194+
/* Dark background utility - ensures all text and headings are white */
195+
.dark-bg,
196+
.dark-bg * {
197+
color: white;
198+
}
199+
200+
.dark-bg a {
201+
color: white;
202+
text-decoration: underline;
203+
}
204+
205+
.dark-bg a:hover {
206+
opacity: 0.8;
207+
}
208+
160209
/* Container */
161210
.container {
162211
max-width: 1280px;

0 commit comments

Comments
 (0)