Let timeline column shrink to its content width
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.
This commit is contained in:
@@ -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;';
|
||||
|
||||
Reference in New Issue
Block a user