fix: light/dark mode consistency with alternating table row colors

This commit is contained in:
Sean Burkes
2026-02-12 15:21:07 -07:00
parent 67a530a83b
commit 9ea4f6b5ef
2 changed files with 12 additions and 12 deletions

View File

@@ -157,16 +157,6 @@
width: 100%; width: 100%;
margin: 1rem 0; margin: 1rem 0;
background-color: transparent; background-color: transparent;
display: block;
padding-right: 0.75rem;
}
.markdown-body thead,
.markdown-body tbody,
.markdown-body tfoot {
width: 100%;
display: table;
table-layout: fixed;
} }
.markdown-body th, .markdown-body th,
@@ -182,8 +172,12 @@
background-color: var(--surface-secondary); background-color: var(--surface-secondary);
} }
.markdown-body tbody tr:nth-child(2n) { .markdown-body tbody > tr:nth-child(odd) > td {
background-color: var(--surface-muted); background-color: var(--markdown-table-row-odd);
}
.markdown-body tbody > tr:nth-child(even) > td {
background-color: var(--markdown-table-row-even);
} }
.markdown-code-block { .markdown-code-block {

View File

@@ -6,6 +6,8 @@
--surface-muted: #f8fafc; --surface-muted: #f8fafc;
--surface-code: #f1f5f9; --surface-code: #f1f5f9;
--surface-hover: #e0e0e0; --surface-hover: #e0e0e0;
--markdown-table-row-odd: transparent;
--markdown-table-row-even: #f1f5f9;
/* Border tokens */ /* Border tokens */
--border-base: #e0e0e0; --border-base: #e0e0e0;
@@ -180,6 +182,8 @@
--surface-muted: #212529; --surface-muted: #212529;
--surface-code: #1a1a1a; --surface-code: #1a1a1a;
--surface-hover: #3a3a3a; --surface-hover: #3a3a3a;
--markdown-table-row-odd: #0f1114;
--markdown-table-row-even: #181c22;
/* Border tokens */ /* Border tokens */
--border-base: #3a3a3a; --border-base: #3a3a3a;
@@ -347,6 +351,8 @@
--surface-muted: #212529; --surface-muted: #212529;
--surface-code: #1a1a1a; --surface-code: #1a1a1a;
--surface-hover: #3a3a3a; --surface-hover: #3a3a3a;
--markdown-table-row-odd: #0f1114;
--markdown-table-row-even: #181c22;
/* Border tokens */ /* Border tokens */
--border-base: #3a3a3a; --border-base: #3a3a3a;