From 3c9f77dc2b5cc92f8daa895efa654b2f0c7b6fc7 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 14 Jun 2024 09:48:55 +1000 Subject: [PATCH] Restore image display with absolute width The `min-width` property is ignored by Firefox. And we don't need the column to grow any bigger than the picture size anyway. An absolute width is correct here. The specification says: > Applies to all elements but non-replaced inline elements, table rows, > and row groups. Firefox is totally right in ignoring it. --- app/views/admin/products_v3/_table.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/admin/products_v3/_table.html.haml b/app/views/admin/products_v3/_table.html.haml index 12722e9d30..0338784a74 100644 --- a/app/views/admin/products_v3/_table.html.haml +++ b/app/views/admin/products_v3/_table.html.haml @@ -15,7 +15,8 @@ %table.products{ 'data-column-preferences-target': "table" } %colgroup - %col{ 'data-column-preferences-name': :image, width:"1%", style:"min-width: 56px" }= # (size + padding) + -# The `min-width` property works in Chrome but not Firefox. + %col{ 'data-column-preferences-name': :image, width:"56px" }= # (image size + padding) %col{ 'data-column-preferences-name': :name, width:"15%", style:"min-width: 6em" }= # (grow to fill) %col{ 'data-column-preferences-name': :sku, width:"10%", style:"min-width: 6em" } %col{ 'data-column-preferences-name': :unit_scale, width:"8%" }