Update table.css

This commit is contained in:
2025-10-06 19:53:07 +08:00
committed by GitHub
parent 0f79020193
commit 880ab64313

View File

@@ -797,21 +797,21 @@ th.amily2-menu-open .amily2-context-menu {
padding: 5px; /* Reduce container padding on mobile */ padding: 5px; /* Reduce container padding on mobile */
} }
/* The problematic wrapping rule is now conditional */ /* On mobile, allow text wrapping to prevent overflow */
#amily2_memorisation_forms_panel:not(.mobile-scrolling) .amily2-chat-table th, .amily2-chat-table th,
#amily2_memorisation_forms_panel:not(.mobile-scrolling) .amily2-chat-table td { .amily2-chat-table td {
white-space: normal; white-space: normal;
word-break: break-all; 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 { .amily2-chat-table td.amily2-cell-highlight {
background-color: var(--am2-cell-highlight-bg, rgba(144, 238, 144, 0.3)); background-color: var(--am2-cell-highlight-bg, rgba(144, 238, 144, 0.3));
transition: background-color 0.5s ease-in-out; 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;
}