From 31bcb0f039ff852298bfd1a7573e5e8492eb0229 Mon Sep 17 00:00:00 2001 From: Piotr Delawski Date: Thu, 25 Jul 2024 10:11:35 +0200 Subject: [PATCH] Ensure list table layout fine even with custom columns added --- ui/css/admin.css | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ui/css/admin.css b/ui/css/admin.css index ec9e1b737..8acceff23 100644 --- a/ui/css/admin.css +++ b/ui/css/admin.css @@ -86,12 +86,15 @@ } .toplevel_page_wp_stream .column-date { - min-width: 10%; + width: 120px; white-space: nowrap; } .toplevel_page_wp_stream .column-date .timeago { - padding-right: 1em; + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; } .toplevel_page_wp_stream .column-user_id { @@ -102,6 +105,17 @@ width: auto; } +/* +Ensure the summary column is not squeezed if there are custom columns added. + +This is because columns width is set to 12% by default (above). Adding a single +custom column leaves less space for the auto-width summary column. Having 2 or +more custom columns squeezes the summary column to a narrow strip. +*/ +.toplevel_page_wp_stream :where(.wp-list-table tr:has(> *:nth-child(7))) .column-summary { + width: 30%; +} + .toplevel_page_wp_stream .column-ip { white-space: nowrap; overflow: hidden;