From 3000374c6959903cac70b8007cb52ce18eaaaab8 Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Sat, 30 Aug 2025 13:02:07 +0200 Subject: [PATCH] Add basic table styling --- site/static/style.css | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/site/static/style.css b/site/static/style.css index 348099b..5938030 100644 --- a/site/static/style.css +++ b/site/static/style.css @@ -422,6 +422,50 @@ section.year span.month { font-weight: 600; } +/* tables */ + +table { + border-collapse: collapse; + width: min(65rem, 100%); + table-layout: fixed; +} + +th, +caption { + text-align: start; +} + +caption { + margin-block: 0.75rem; +} + +thead th:not(:first-child), +td { + text-align: end; +} + +th, +td { + border: 1px solid var(--palette-2); + padding: 0.25rem 0.75rem; + vertical-align: baseline; +} + +th:first-child { + position: sticky; + inset-inline-start: 0; + border-inline-end: none; +} + +tbody th { + background: var(--palette-3); + vertical-align: bottom; +} + +th:first-of-type { + width: 10rem; +} + /* syntax highlighting and code blocks */ code { -- 2.49.0