Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions crates/opencode-ui/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
Expand Down
Loading