From 355a888e3b8d8df48501ebbfc71afc2ec739082d Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Fri, 15 May 2026 13:57:00 +0200 Subject: [PATCH] Let timeline column shrink to its content width MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fixed 140px width on the timeline TD reserved a lot of empty space to the right of the date — on narrow viewports it squeezed the cards severely. Replaced the hard width with the standard \`width:1%\` email-table trick so the cell collapses to whatever the date line actually needs (about 80-95px); the card column inherits the rest. Right padding dropped from 14 to 4 to tighten further. --- resources/views/email.phtml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/views/email.phtml b/resources/views/email.phtml index f28ef63..a79f14f 100644 --- a/resources/views/email.phtml +++ b/resources/views/email.phtml @@ -399,8 +399,12 @@ $content_inner_td = 'vertical-align:middle;' // Outer row cells: card on the left, a small gutter, then the rail. $outer_card_td = 'vertical-align:middle;padding-bottom:' . $row_gap . 'px;'; $outer_gutter_td = 'width:16px;padding-bottom:' . $row_gap . 'px;'; -$outer_rail_td = 'width:140px;vertical-align:middle;' - . 'padding:0 14px ' . $row_gap . 'px 24px;' +// `width:1%` is the standard email-safe trick to make a TD shrink +// to its content, giving the card column on the left whatever +// width is left over. Combined with white-space:nowrap, the cell +// is exactly as wide as the longest "MONTH 1898" date line. +$outer_rail_td = 'width:1%;vertical-align:middle;' + . 'padding:0 4px ' . $row_gap . 'px 24px;' . 'border-left:4px solid ' . $palette['rail'] . ';' . 'font-family:' . $font_stack . ';' . 'color:' . $palette['ink3'] . ';white-space:nowrap;';