From fe8dc5297f92270486a8fde5ad39b5d64d0c71f7 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Mon, 28 Sep 2026 00:16:35 +1300 Subject: [PATCH 1/2] Scale component spacing with local font sizes. Signed-off-by: Samuel Williams --- public/_static/site.css | 49 ++++++++++++++++++++--------------------- releases.md | 1 + 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/public/_static/site.css b/public/_static/site.css index c7aa4db..3da6f17 100644 --- a/public/_static/site.css +++ b/public/_static/site.css @@ -30,7 +30,7 @@ html { } p code { - padding: 0 0.2rem; + padding: 0 0.2em; } p code:first-child, p code:last-child { @@ -145,8 +145,8 @@ header .header-actions { header .sections a { text-decoration: none; color: var(--main-color); - padding: 0.25rem 0.5rem; - border-radius: 0.25rem; + padding: 0.25em 0.5em; + border-radius: 0.25em; white-space: nowrap; } @@ -220,8 +220,8 @@ header .sections a:focus-visible, display: flex; align-items: center; flex-wrap: nowrap; - gap: 0.125rem; - padding: 0.25rem 0.5rem; + gap: 0.125em; + padding: 0.25em 0.5em; border-bottom: 1px solid var(--underlay-color); font-size: 0.9em; overflow-x: auto; @@ -232,8 +232,8 @@ header .sections a:focus-visible, .subnav a { text-decoration: none; color: var(--main-color); - padding: 0.15rem 0.5rem; - border-radius: 0.25rem; + padding: 0.15em 0.5em; + border-radius: 0.25em; white-space: nowrap; } @@ -248,8 +248,8 @@ header .sections a:focus-visible, .subnav.breadcrumb a + a::before { content: "::"; - margin-left: -0.5rem; - margin-right: 0.5rem; + margin-left: -0.5em; + margin-right: 0.5em; opacity: 0.4; } @@ -347,13 +347,13 @@ main { } .sidebar nav a { - padding: 0.4rem 0.75rem; + padding: 0.4em 0.75em; font-size: 0.9rem; border-left: 3px solid transparent; color: var(--main-color); text-decoration: none; display: block; - border-radius: 0.25rem; + border-radius: 0.25em; transition: background-color 0.15s, border-color 0.15s, color 0.15s; } @@ -510,7 +510,7 @@ pre { details { margin: 1rem; border: 1px solid #aaa; - border-radius: 0.5rem; + border-radius: 0.5em; padding: .5em .5em 0; } @@ -522,18 +522,17 @@ summary > * { summary { font-weight: bold; - margin: -.5rem -.5rem 0; - padding: .5rem; + margin: -.5em -.5em 0; + padding: .5em; cursor: pointer; } details[open] { - padding: .5rem; + padding: .5em; } details[open] summary { border-bottom: 1px solid #aaa; - /* margin-bottom: .5rem; */ } figure { @@ -568,7 +567,7 @@ table { } table th, table td { - padding: 0.5rem 0.75rem; + padding: 0.5em 0.75em; } table thead { @@ -598,13 +597,13 @@ ul.pragmas li { border-radius: 0.5em; box-shadow: 0 0 2px #eee; - padding: 0.1rem 0.2rem; + padding: 0.1em 0.2em; display: inline-block; } ul.pragmas li + li { - margin-left: 0.5rem; + margin-left: 0.5em; } ul.pragmas li.public { @@ -678,8 +677,8 @@ ul.pragmas li.asynchronous { color: var(--main-color); text-decoration: none; display: block; - padding: 0.25rem 0.5rem; - border-radius: 0.25rem; + padding: 0.25em 0.5em; + border-radius: 0.25em; transition: background-color 0.15s, border-color 0.15s, color 0.15s; } @@ -737,13 +736,13 @@ ul.pragmas li.asynchronous { .sidebar nav a, .sidebar details nav a { - padding: 0.4rem 0.75rem; + padding: 0.4em 0.75em; font-size: 0.9rem; border-left: 3px solid transparent; color: var(--main-color); text-decoration: none; display: block; - border-radius: 0.25rem; + border-radius: 0.25em; transition: all 0.2s ease; } @@ -753,7 +752,7 @@ ul.pragmas li.asynchronous { } .sidebar nav.compact a { - padding: 0.25rem 0.5rem; + padding: 0.25em 0.5em; font-size: 0.85rem; line-height: 1.3; } @@ -794,7 +793,7 @@ ul.pragmas li.asynchronous { .sidebar nav a:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; - border-radius: 0.25rem; + border-radius: 0.25em; } /* Brief click feedback */ diff --git a/releases.md b/releases.md index f1b3c74..efda0b7 100644 --- a/releases.md +++ b/releases.md @@ -3,6 +3,7 @@ ## Unreleased - Add padding to documentation table cells and allow tables to scroll whenever they exceed the available width. + - Scale table, inline code, badge, navigation link, and disclosure spacing with the local font size. ## v0.45.0 From 33a71254de5fb575f1baabc07c45c286ff9b270f Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Mon, 28 Sep 2026 10:28:22 +1300 Subject: [PATCH 2/2] Refine table padding and alternate column backgrounds. Signed-off-by: Samuel Williams --- public/_static/site.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/_static/site.css b/public/_static/site.css index 3da6f17..f6485ec 100644 --- a/public/_static/site.css +++ b/public/_static/site.css @@ -567,7 +567,11 @@ table { } table th, table td { - padding: 0.5em 0.75em; + padding: 0.1em 0.4em; +} + +table th:nth-child(even), table td:nth-child(even) { + background-color: color-mix(in srgb, var(--main-color) 2%, transparent); } table thead {