Skip to content

Commit

Permalink
Ensure list table layout fine even with custom columns added
Browse files Browse the repository at this point in the history
  • Loading branch information
delawski committed Jul 25, 2024
1 parent fb9033c commit 31bcb0f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions ui/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down

0 comments on commit 31bcb0f

Please sign in to comment.