From c986773643eab77d22f213393e7570da6fcca977 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 22 Apr 2026 19:42:10 +0800 Subject: [PATCH] feat: Adjust table styling in WikiBrowser for improved layout - Modified the CSS for markdown tables to use `width: fit-content`, allowing tables to shrink to their content while still respecting `max-width: 100%`. - This change enhances the presentation of tables, ensuring better usability and visual consistency within the WikiBrowser interface. --- frontend/src/views/knowledge/wiki/WikiBrowser.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/knowledge/wiki/WikiBrowser.vue b/frontend/src/views/knowledge/wiki/WikiBrowser.vue index 584139e6..a56b3415 100644 --- a/frontend/src/views/knowledge/wiki/WikiBrowser.vue +++ b/frontend/src/views/knowledge/wiki/WikiBrowser.vue @@ -2272,9 +2272,12 @@ onUnmounted(() => { } // ── Markdown tables (GFM) ── + // Use `width: fit-content` so tables shrink to their content instead of + // always stretching to fill the reader column, while still respecting + // `max-width: 100%` and allowing horizontal scrolling for wide tables. :deep(table) { display: block; - width: 100%; + width: fit-content; max-width: 100%; overflow-x: auto; margin: 0 0 16px;