cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

565d74d03e5635f700fcc464afc79c1192402a8e

verified · cmc

author: Christian Cleberg <hello@cleberg.net> · 2026-08-12T01:49:53Z

Give tables a border and cells some padding

Collapsed 1px borders on the table and its cells, so a shared edge draws
one line rather than two, and enough padding that text is not flush
against it. Headers align left with the rest of the column.

The dark scheme dials the border back to #444; #ccc against the near-black
background was louder than the borders around it.
 theme/static/styles.css | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/theme/static/styles.css b/theme/static/styles.css
index 19e4711..6f9ef0c 100644
--- a/theme/static/styles.css
+++ b/theme/static/styles.css
@@ -9,6 +9,9 @@ img { max-width: 100%; }
 .post-list-item a { flex-grow: 1; white-space: normal; }
 .post-list-year { list-style: none; margin-top: 1rem; margin-bottom: 0.5rem; font-weight: bold; }
 .skip-link { display: none; }
+table { border-collapse: collapse; }
+table, th, td { border: 1px solid #ccc; }
+th, td { padding: 0.25rem 0.5rem; text-align: left; }
 footer { margin: 2rem 0;}
 pre, blockquote { margin: 1rem 0; padding: 0.5rem; background-color: #eee; }
 pre { overflow: auto; white-space: pre; }
@@ -20,4 +23,5 @@ code { color: #942192; }
 	a, a:visited { color: #68A9F8; }
 	code { color: #ff68e1; }
 	pre, blockquote { background-color: black; }
+	table, th, td { border-color: #444; }
 }