From 9f429e5a6220bfc413e7e50d4092777f34394bdb Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Aug 2026 09:42:40 +0800 Subject: [PATCH] fix(orders): stop no-thumbnail order items being squeezed Order items without a product thumbnail render the title and price into the 3-column grid with the image slot missing, so the title gets crushed into the 64px image column and the price floats far right. Tag such items with a --no-image modifier that drops the image column (desktop: title fills the row with price right-aligned; mobile: title full-width, price wraps below). --- assets/css/routes/orders.css | 14 ++++++++++++ .../user-center-renderers/profile-orders.php | 22 +++++++++++-------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/assets/css/routes/orders.css b/assets/css/routes/orders.css index a4388c26..3ea3fd24 100644 --- a/assets/css/routes/orders.css +++ b/assets/css/routes/orders.css @@ -315,6 +315,12 @@ align-items: center; } +/* Item without a thumbnail: drop the fixed 64px image column so the title + * and price fill the row instead of being crushed into the missing image cell. */ +.aksrt-orders-page__card-item--no-image { + grid-template-columns: minmax(0, 1fr) auto; +} + .aksrt-orders-page__card-img { width: 64px; height: 64px; @@ -1520,6 +1526,14 @@ html.dark .aksrt-order-detail-dialog .aksrt-modal__footer { align-items: baseline; } + .aksrt-orders-page__card-item--no-image { + grid-template-columns: minmax(0, 1fr); + } + + .aksrt-orders-page__card-item--no-image .aksrt-orders-page__card-item-price { + grid-column: auto; + } + .aksrt-orders-page__card-time { margin-left: 0; width: 100%; diff --git a/inc/helpers/user-center-renderers/profile-orders.php b/inc/helpers/user-center-renderers/profile-orders.php index bf1d6d67..293e873b 100644 --- a/inc/helpers/user-center-renderers/profile-orders.php +++ b/inc/helpers/user-center-renderers/profile-orders.php @@ -197,12 +197,15 @@ $pending_count = (int) ($stats['pending'] ?? 0);
- -
- - - - + +
+ +
@@ -223,9 +226,10 @@ $pending_count = (int) ($stats['pending'] ?? 0);
-
- - + +
+ +