Skip to content

Commit 380e25b

Browse files
committed
Add display table css
1 parent d832d00 commit 380e25b

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

app/javascript/css/application.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
@import './components/anchors.scss';
3636
@import './components/callout.css';
3737
@import './components/color-scheme.scss';
38+
@import './components/table.css';
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.table {
2+
& .table-row:nth-child(odd) {
3+
background-color: var(--color-slate-200);
4+
}
5+
& .table-row:first-child {
6+
background-color: var(--joy-color-200);
7+
}
8+
}
9+
10+
.dark {
11+
.table {
12+
& .table-row:nth-child(odd) {
13+
background-color: var(--color-slate-800);
14+
}
15+
16+
& .table-row:first-child {
17+
background-color: var(--joy-color-950);
18+
}
19+
}
20+
}

app/javascript/css/utilities/tailwind.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,18 @@
224224
display: contents;
225225
}
226226

227+
.table {
228+
display: table;
229+
}
230+
231+
.table-row {
232+
display: table-row;
233+
}
234+
235+
.table-cell {
236+
display: table-cell;
237+
}
238+
227239
.h-16 {
228240
height: 4rem;
229241
}

0 commit comments

Comments
 (0)