Skip to content

Commit 723dfd2

Browse files
jwilgerclaude
andauthored
Fix header logo gradient visibility (#102)
## Summary - Fixes the header logo gradient that wasn't visible - Wraps the header logo `<img>` in a container div to properly display the gradient effect - Applies the gradient to the container using `::before` pseudo-element, matching the floating-card implementation ## Problem The gradient effect wasn't showing because `::before` pseudo-elements don't work properly on `<img>` elements. The previous implementation tried to apply the gradient directly to the image element, which doesn't render as expected. ## Solution This PR wraps the header logo in a `.logo-container` div and applies the gradient effect to this container, following the same pattern used successfully for the `.floating-card` in the hero section. ## Test Plan 1. Run the docs site locally: `cd docs && python -m http.server 8000` 2. Navigate to http://localhost:8000 3. Verify the header logo now has a subtle blue-to-mauve gradient glow behind it 4. Confirm the gradient matches the visual style of the hero section logo 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent f23a379 commit 723dfd2

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

docs/assets/css/style.css

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,13 @@ body {
119119
animation: float 3s ease-in-out infinite;
120120
}
121121

122-
.nav-brand .logo {
122+
.nav-brand .logo-container {
123123
width: 60px;
124124
height: 60px;
125-
border-radius: 8px;
126-
padding: 4px;
127-
animation: none;
128125
position: relative;
129126
}
130127

131-
.nav-brand .logo::before {
128+
.nav-brand .logo-container::before {
132129
content: '';
133130
position: absolute;
134131
inset: var(--gradient-inset-negative);
@@ -139,6 +136,16 @@ body {
139136
filter: blur(var(--gradient-blur-size));
140137
}
141138

139+
.nav-brand .logo {
140+
width: 100%;
141+
height: 100%;
142+
border-radius: 8px;
143+
padding: 4px;
144+
animation: none;
145+
position: relative;
146+
z-index: 1;
147+
}
148+
142149
@keyframes float {
143150
0%, 100% { transform: translateY(0); }
144151
50% { transform: translateY(-5px); }

docs/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
<div class="container">
1515
<div class="nav-content">
1616
<div class="nav-brand">
17-
<img src="logo.svg" alt="Union Square Logo" class="logo">
17+
<div class="logo-container">
18+
<img src="logo.svg" alt="Union Square Logo" class="logo">
19+
</div>
1820
<span class="brand-text">Union Square</span>
1921
</div>
2022
<div class="nav-links">

0 commit comments

Comments
 (0)