From a64da0b41c3f035fdd24e641d6e93b0d873df837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20M=C3=BCller?= Date: Wed, 18 Nov 2026 07:42:11 +0100 Subject: [PATCH 1/2] fix(booking): make form controls inherit the surrounding font family Buttons, inputs, selects and textareas take their font family from the UA stylesheet, so in the booking UI the day cells, time slots, back link and confirm button rendered in the system UI font next to text in the page font. It is most visible in the embed widget: an embedder who sets `calnode-booking { font-family: ... }` got the brand font on headings and labels but on none of the controls. Only font-family is inherited. Every control already sets its own size and weight, and `font: inherit` would also inherit line-height and change control heights. --- CHANGELOG.md | 8 ++++++++ internal/handler/embed_handler_test.go | 9 +++++++++ internal/handler/templates/booking.css | 9 +++++++++ 3 files changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b8c250c..b732fa70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,14 @@ exact tag (`ghcr.io/calnode/calnode:0.1.0`) if you need stability between upgrad ## [Unreleased] +### Fixed + +- **Buttons and inputs in the booking UI now use the surrounding font.** Form controls + take their font family from the browser stylesheet, so day cells, time slots and the + confirm button rendered in the system font beside text in the page font. An embedder who + set `calnode-booking { font-family: … }` got the brand font everywhere except on the + controls. Sizes, weights and control heights are unchanged. + ## [0.14.0] - 2026-11-08 ### Added diff --git a/internal/handler/embed_handler_test.go b/internal/handler/embed_handler_test.go index 42654eb6..a0608fe7 100644 --- a/internal/handler/embed_handler_test.go +++ b/internal/handler/embed_handler_test.go @@ -87,3 +87,12 @@ func TestBookingCSS_cacheModes(t *testing.T) { t.Errorf("versioned Cache-Control = %q, want immutable", cc) } } + +// Form controls take their font family from the UA stylesheet unless told otherwise, so +// without this rule every button in the widget ignores the font the embedding page set +// on . Nothing else in the suite renders CSS, so pin the rule itself. +func TestBookingCSS_controlsInheritFontFamily(t *testing.T) { + if !strings.Contains(string(bookingCSS), "button, input, select, textarea { font-family: inherit; }") { + t.Error("booking.css no longer makes form controls inherit font-family; buttons fall back to the UA font inside the embed widget") + } +} diff --git a/internal/handler/templates/booking.css b/internal/handler/templates/booking.css index 412be3f8..c0ded652 100644 --- a/internal/handler/templates/booking.css +++ b/internal/handler/templates/booking.css @@ -10,6 +10,15 @@ * padding removes default