From 880ab643133b47b9afd926ed0f3915710cfbae26 Mon Sep 17 00:00:00 2001 From: Wx-2025 <351320169@qq.com> Date: Mon, 6 Oct 2025 19:53:07 +0800 Subject: [PATCH] Update table.css --- assets/table.css | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/table.css b/assets/table.css index c15866b..12f68f9 100644 --- a/assets/table.css +++ b/assets/table.css @@ -797,21 +797,21 @@ th.amily2-menu-open .amily2-context-menu { padding: 5px; /* Reduce container padding on mobile */ } - /* The problematic wrapping rule is now conditional */ - #amily2_memorisation_forms_panel:not(.mobile-scrolling) .amily2-chat-table th, - #amily2_memorisation_forms_panel:not(.mobile-scrolling) .amily2-chat-table td { + /* On mobile, allow text wrapping to prevent overflow */ + .amily2-chat-table th, + .amily2-chat-table td { white-space: normal; word-break: break-all; } } -/* Force horizontal scrolling on mobile devices by preventing text wrapping */ -#amily2_memorisation_forms_panel.mobile-scrolling .amily2-chat-table th, -#amily2_memorisation_forms_panel.mobile-scrolling .amily2-chat-table td { - white-space: nowrap !important; -} - .amily2-chat-table td.amily2-cell-highlight { background-color: var(--am2-cell-highlight-bg, rgba(144, 238, 144, 0.3)); transition: background-color 0.5s ease-in-out; } + +/* Override for mobile horizontal scrolling when JS detects a touch device */ +#amily2-chat-table-container.mobile-table-view .amily2-chat-table th, +#amily2-chat-table-container.mobile-table-view .amily2-chat-table td { + white-space: nowrap; +}