From 4c6b02a6b9d0e83050bb0881ddb52befe3da8479 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 4 Oct 2026 19:19:29 +0800 Subject: [PATCH] fix(user-home): restore desktop comment columns --- assets/css/routes/profile/lists.css | 11 +++++++++++ tests/widget-system/profile-comment-contract.test.cjs | 1 + 2 files changed, 12 insertions(+) diff --git a/assets/css/routes/profile/lists.css b/assets/css/routes/profile/lists.css index aeb87b60..0e3ac5d9 100644 --- a/assets/css/routes/profile/lists.css +++ b/assets/css/routes/profile/lists.css @@ -243,6 +243,17 @@ gap: 0; } +@media (min-width: 992px) { + .profile-comment-list { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .profile-comment-item { + margin: 8px; + } +} + .profile-comment-item { display: flex; align-items: flex-start; diff --git a/tests/widget-system/profile-comment-contract.test.cjs b/tests/widget-system/profile-comment-contract.test.cjs index dbc4a9f8..0e8f55ae 100644 --- a/tests/widget-system/profile-comment-contract.test.cjs +++ b/tests/widget-system/profile-comment-contract.test.cjs @@ -36,6 +36,7 @@ test('profile comments follow the author-page row and moderation contract', () = assert.match(styles, /\.profile-comment-item__time\s*\{[^}]*flex:\s*0 0 20%;[^}]*margin-right:\s*20px;[^}]*text-align:\s*right;/s); assert.match(styles, /\.profile-comment-item__body\s*\{[^}]*width:\s*calc\(80% - 25px\)/s); + assert.match(styles, /@media \(min-width: 992px\)\s*\{\s*\.profile-comment-list\s*\{[^}]*display:\s*grid;[^}]*grid-template-columns:\s*repeat\(2,\s*minmax\(0,\s*1fr\)\);[^}]*\}[^}]*\.profile-comment-item\s*\{[^}]*margin:\s*8px;/s); assert.match(styles, /\.profile-comment-item__content\s*\{[^}]*-webkit-line-clamp:\s*5;/s); assert.match(styles, /@media \(max-width: 640px\)[\s\S]*?\.profile-comment-item\s*\{\s*padding:\s*10px 0;/); assert.doesNotMatch(styles, /profile-comment-item__(?:quote|meta)/);