Add <table/> styles

This commit is contained in:
Foster Hangdaan 2023-08-03 22:37:20 -04:00
parent f678f76b9c
commit 26f92c853a
Signed by: foster
GPG key ID: E48D7F49A852F112
2 changed files with 42 additions and 0 deletions

View file

@ -145,3 +145,43 @@ blockquote {
margin-bottom: 0; margin-bottom: 0;
} }
} }
table {
margin: 0.5rem 0;
border-radius: 5px;
border: 1px solid var(--color-black);
border-spacing: 0;
thead {
tr {
th {
border-bottom: 2px solid var(--color-black);
border-right: 1px solid var(--color-black);
padding: 0.75rem;
font-weight: bold;
&:last-child {
border-right: none;
}
}
}
}
tbody {
tr {
&:nth-child(odd) {
background-color: var(--color-table-stripe);
}
td {
border-bottom: 1px solid var(--color-black);
border-right: 1px solid var(--color-black);
padding: 0.75rem;
&:last-child {
border-right: none;
}
}
&:last-child {
td {
border-bottom: none;
}
}
}
}
}

View file

@ -117,6 +117,7 @@ :root {
--color-bg--layer-01: var(--tn-storm--background-40); --color-bg--layer-01: var(--tn-storm--background-40);
--color-bg--layer-02: var(--tn-storm--background-30); --color-bg--layer-02: var(--tn-storm--background-30);
--color-headings: var(--color-cyan); --color-headings: var(--color-cyan);
--color-table-stripe: var(--tn-night--background-40);
} }
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
@ -139,5 +140,6 @@ @media (prefers-color-scheme: light) {
--color-bg--layer-01: var(--tn-light--background-60); --color-bg--layer-01: var(--tn-light--background-60);
--color-bg--layer-02: var(--tn-light--background-70); --color-bg--layer-02: var(--tn-light--background-70);
--color-headings: var(--color-cyan); --color-headings: var(--color-cyan);
--color-table-stripe: var(--tn-light--background-60);
} }
} }