From 24226695748cc9593348879c175a35662abe13a3 Mon Sep 17 00:00:00 2001
From: Ralf Steinert <122486565+steitec@users.noreply.github.com>
Date: Mon, 9 Nov 2026 16:40:08 +0100
Subject: [PATCH] Keep result table content inside its columns
Limit sources wrap instead of overflowing, the tolerance band scales to
its column, and the band has literal colours because WeasyPrint does not
resolve CSS variables in SVG attributes.
---
CHANGELOG.md | 7 +++++++
src/test_protocol/html.py | 14 +++++++++-----
tests/test_html.py | 26 ++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 49bf9ad..851bce6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## Unreleased
+
+- Result tables: the limit source wraps instead of running into the tolerance
+ band, and the tolerance band scales to its column instead of touching the
+ status badge
+- Tolerance bands are no longer black in PDFs made with WeasyPrint
+
## 0.1.1 — 2026-11-08
- Docker image `ghcr.io/steitec/test-protocol` with WeasyPrint and its system libraries,
diff --git a/src/test_protocol/html.py b/src/test_protocol/html.py
index 7c30824..b5baa16 100644
--- a/src/test_protocol/html.py
+++ b/src/test_protocol/html.py
@@ -75,6 +75,7 @@ def _limits(item: Item, lang: str) -> str:
text = f"≤ {fmt_number(item.high, lang)}"
else:
return "—"
+ text = f'{text}'
if item.limit_source:
text += f' ({_e(item.limit_source)})'
return text
@@ -93,10 +94,10 @@ def x(v: float) -> float:
return 4 + 112 * (min(max(v, lo), hi) - lo) / (hi - lo)
color = _STATUS_COLORS["PASS" if low <= value <= high else "FAIL"]
- return (f'