Project

General

Profile

Actions

Patch #44029

open

Wide tables in attachment preview overflow the container border

Added by Mizuki ISHIKAWA 2 days ago. Updated 2 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
-

Description

When previewing a Pandoc-converted attachment such as an xlsx file with many columns, a wide table overflows outside the .filecontent.wiki border, breaking the layout.
The same issue occurs when previewing a Markdown file that contains a wide table.

Proposed fix: Add overflow-x: auto to .filecontent.wiki in application.css

diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 007eaabb0..57d5ab372 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -2553,6 +2553,7 @@ img {
   border: 1px solid var(--oc-gray-4);
   border-radius: 3px;
   box-shadow: 0 1px 2px rgba(var(--oc-gray-9-rgb), 0.05);
+  overflow-x: scroll;
 }

 .pdf-full-view-link { margin: 0 0 0.5em; }


Files

sample.xlsx (6.8 KB) sample.xlsx Mizuki ISHIKAWA, 2026-05-07 07:55
Actions #1

Updated by Mizuki ISHIKAWA 2 days ago

The diff was incorrect. `overflow-x: auto` is more appropriate.

diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 007eaabb0..57d5ab372 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -2553,6 +2553,7 @@ img {
   border: 1px solid var(--oc-gray-4);
   border-radius: 3px;
   box-shadow: 0 1px 2px rgba(var(--oc-gray-9-rgb), 0.05);
+  overflow-x: auto;
 }

 .pdf-full-view-link { margin: 0 0 0.5em; }

Actions

Also available in: Atom PDF