From cbc353c1af0f4c051113e60864d7940aa536ff14 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Sat, 5 Dec 2026 21:52:55 -0800 Subject: [PATCH] feat(timeline): Markdown tables are one flat card with a lifted header row --- crates/opencode-ui/src/style.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/opencode-ui/src/style.rs b/crates/opencode-ui/src/style.rs index b53f63c74..da3238b24 100644 --- a/crates/opencode-ui/src/style.rs +++ b/crates/opencode-ui/src/style.rs @@ -453,7 +453,19 @@ pub fn markdown_style(p: &Pal, color: Color, width: f32) -> MarkdownStyle { .list_markers_outside(true) .list_nested_indent(16.0, 28.0) .task_checkbox(13.0, 2.0, 12.0, Some(4.0), checkbox(p, true), checkbox_mark(p), checkbox(p, false), checkbox_border(p)) - .table_card(k) + // A table is one flat `bg_base` card in a single 0.5 pt `border_muted` ring, with no inner + // body card or tray. The header band lifts 3 % toward the theme's text colour (2 % in light), + // and one hairline in the ring's colour runs under the header and between every row. + .table_frame(p.bg_base, p.border_muted, 0.5) + .table_rules(p.border_muted) + .table_header_fill(p.text.alpha(if p.dark { 0.03 } else { 0.02 })) + .table_header_pad(12.0, 8.0) + .table_cell_padding(12.0, 9.0) + // 18 pt lines leave a gap between inline-code pills when a cell wraps. + .table_font(TextStyle { weight: 440.0, tracking: -0.04, ..k.ty.ui_compact }.lh(18.0)) + .table_tabular_figures(true) + .table_full_width(true) + .table_margin(16.0, 16.0) .table_header_text(p.muted) .table_header_weight(530.0) .table_column_align(false) @@ -480,7 +492,6 @@ pub fn markdown_style(p: &Pal, color: Color, width: f32) -> MarkdownStyle { md.strong_weight(600.0) .prose_width(width.min(560.0)) .table_font(TextStyle::new(13.5, table_w).lh(20.5).tracking(0.03).features("'cv05' 1")) - .table_cell_padding(12.0, 9.0) } else { md }