]> git.nega.tv - josh/negatv/commitdiff
Add basic table styling
authorJoshua Simmons <josh@nega.tv>
Sat, 30 Aug 2025 11:02:07 +0000 (13:02 +0200)
committerJoshua Simmons <josh@nega.tv>
Sat, 30 Aug 2025 11:02:17 +0000 (13:02 +0200)
site/static/style.css

index 348099bd8b384a3b59a69e0c61c438d0e7e39fd8..5938030bfb9cad9dd6e4541389fd890cbf8fa9dd 100644 (file)
@@ -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 {