Commit 2500e7d
Remove redundant CSS variables from NavBar component
Following the hybrid CSS pattern from PLAIN_CSS_MIGRATION_GUIDE.md, removed CSS variables that were:
- Set to hardcoded static values in JSX
- Had identical fallback values in CSS
- Not derived from theme.ts
- Never changed at runtime
Removed redundant variables:
- --navbar-logo-height-desktop / --navbar-logo-height-mobile
- --navbar-overlay-logo-top
- --navbar-height-desktop / --navbar-height-mobile
- --navbar-max-width
Kept theme-derived variables (correct usage):
- --navbar-z-index (from theme.zIndex.navbar)
- --navbar-bg (from theme.color.neutral.base)
- --navbar-padding-desktop/mobile (from theme.padding.page)
- --nav-text-color (from theme.color.primary.gray.base)
- --mobile-overlay-bg (computed with Color library)
- --mobile-overlay-z-index (computed from theme)
This makes the code cleaner and follows the migration guide's principle:
"CSS variables should be used when values need to be looked up from theme.ts at runtime or require JavaScript computation"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent f986d1f commit 2500e7d
2 files changed
Lines changed: 9 additions & 23 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
228 | | - | |
| 227 | + | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 69 | | |
74 | 70 | | |
75 | 71 | | |
| |||
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
81 | | - | |
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
| |||
283 | 278 | | |
284 | 279 | | |
285 | 280 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 281 | | |
292 | 282 | | |
293 | 283 | | |
| |||
297 | 287 | | |
298 | 288 | | |
299 | 289 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | 290 | | |
305 | 291 | | |
306 | 292 | | |
| |||
0 commit comments