Commit 9982e3b
committed
refactor: use CSS variables for layout dimensions
Replaced hardcoded Tailwind classes with CSS variables for maintainability:
- --navbar-height: 3.5rem (56px)
- --sidebar-width: 15rem (240px)
- --sidebar-width-collapsed: 4rem (64px)
Now if navbar height changes, update ONE variable instead of hunting
through multiple files. Uses Tailwind arbitrary values syntax:
h-[var(--navbar-height)], pt-[var(--navbar-height)], etc.
Files updated:
- index.css: Added layout CSS variables
- TopNav.tsx: h-14 → h-[var(--navbar-height)]
- DashboardLayout.tsx: pt-14, ml-16/60 → CSS variables
- Sidebar.tsx: top-14, w-16/60 → CSS variables1 parent 55919b6 commit 9982e3b
4 files changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
0 commit comments