Skip to content

Commit 4ed5189

Browse files
ppippi-devclaude
andcommitted
style(blog): improve table styling with proper borders and hover
- Add consistent padding and font sizing - Add responsive table display (block on mobile) - Add thead border and th background styling - Add row hover effect - Add border-radius on corner cells - Add code cell font size adjustment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e53264b commit 4ed5189

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

src/styles/global.css

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,56 @@ textarea, input, button {
163163
table {
164164
width: 100%;
165165
border-collapse: collapse;
166+
margin: 1.5rem 0;
167+
font-size: 0.9375rem;
168+
overflow-x: auto;
169+
display: block;
170+
}
171+
172+
@media (min-width: 640px) {
173+
table {
174+
display: table;
175+
}
176+
}
177+
178+
thead {
179+
border-bottom: 2px solid var(--border-color);
180+
}
181+
182+
th {
183+
text-align: left;
184+
padding: 0.75rem 1rem;
185+
font-weight: 600;
186+
color: var(--text-primary);
187+
background: var(--bg-secondary);
188+
white-space: nowrap;
189+
}
190+
191+
th:first-child {
192+
border-radius: var(--radius-sm) 0 0 0;
193+
}
194+
195+
th:last-child {
196+
border-radius: 0 var(--radius-sm) 0 0;
197+
}
198+
199+
td {
200+
padding: 0.75rem 1rem;
201+
border-bottom: 1px solid var(--border-color);
202+
color: var(--text-secondary);
203+
}
204+
205+
tr:last-child td {
206+
border-bottom: none;
207+
}
208+
209+
tbody tr:hover {
210+
background: var(--bg-secondary);
211+
}
212+
213+
/* Table with code cells */
214+
td code {
215+
font-size: 0.8125rem;
166216
}
167217

168218
/* Images */

0 commit comments

Comments
 (0)