Skip to content

Commit 7b5dd94

Browse files
committed
chore: enhance table styling
1 parent 5d40749 commit 7b5dd94

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

example.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,20 @@ Hover on the bottom-left corner to see the navigation's controls panel
106106
1. is
107107
1. an enumerated list.
108108

109+
---
110+
111+
# Tables
112+
113+
| Header 1 | Header 2 | Header 3 |
114+
| -------- | -------- | -------- |
115+
| Row 1 | Row 1 | Row 1 |
116+
| Row 2 | Row 2 | Row 2 |
117+
| Row 3 | Row 3 | Row 3 |
118+
| Row 4 | Row 4 | Row 4 |
119+
109120
---
110121
layout: image-right
111-
image: 'https://source.unsplash.com/collection/94734566/1920x1080'
122+
image: 'https://images.unsplash.com/photo-1527095655060-4026c4af2b25?q=80&w=1740'
112123
---
113124

114125
# Code `Code`

styles/layout.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@
6060
--slidev-theme-primary: #539350;
6161
--slidev-theme-primary-alternative: #8bca88;
6262
--slidev-theme-secondary: #fa5100;
63+
--slidev-theme-background-gray: #e2e2e2;
64+
}
65+
66+
@media (prefers-color-scheme: dark) {
67+
:root {
68+
--slidev-theme-background-gray: #2e2e2e;
69+
}
6370
}
6471

6572
html {
@@ -159,10 +166,28 @@ h6 {
159166
margin: 0;
160167
}
161168

169+
.slidev-layout th {
170+
font-weight: bold;
171+
padding: 0.3rem;
172+
background-color: var(--slidev-theme-background-gray);
173+
}
174+
175+
.slidev-layout th:empty {
176+
background-color: transparent;
177+
}
178+
179+
.slidev-layout td {
180+
padding: 0.3rem;
181+
}
182+
162183
.slidev-layout.cover {
163184
background-repeat: no-repeat;
164185
}
165186

187+
.slidev-layout + .h-full {
188+
z-index: -1;
189+
}
190+
166191
.col-right pre:first-of-type, .col-left pre:first-of-type {
167192
margin-top: 1rem;
168193
}

0 commit comments

Comments
 (0)