From db77bd04a5879186aa73582fb6bde724b3d27f17 Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 22 Oct 2026 13:27:56 -0400 Subject: [PATCH] Even out the customer cards The Actions cell was display:flex, so it stopped acting like a table cell. Its row line and height drifted from the other columns on desktop, and on phone cards the links were pushed to the right edge instead of lining up with the other values. The links now sit in an inline-flex wrapper inside a normal cell. Phone cards also drop the extra line under the last field, profile links stack evenly on phones, and the three home choices stay in one row from tablet up instead of a 2 + 1 split. --- .../customer-lookup-page.component.html | 6 ++-- .../customers/customer-pages.component.css | 1 + frontend/src/styles.css | 36 ++++++++++++------- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/frontend/src/app/features/customers/customer-lookup-page.component.html b/frontend/src/app/features/customers/customer-lookup-page.component.html index dd1491a..258d120 100644 --- a/frontend/src/app/features/customers/customer-lookup-page.component.html +++ b/frontend/src/app/features/customers/customer-lookup-page.component.html @@ -65,8 +65,10 @@

Look up a customer

{{ customer.fullName }} {{ customer.status }} - Profile for {{ customer.fullName }} - Edit {{ customer.fullName }} + + Profile for {{ customer.fullName }} + Edit {{ customer.fullName }} + } diff --git a/frontend/src/app/features/customers/customer-pages.component.css b/frontend/src/app/features/customers/customer-pages.component.css index 4958732..d013a27 100644 --- a/frontend/src/app/features/customers/customer-pages.component.css +++ b/frontend/src/app/features/customers/customer-pages.component.css @@ -176,6 +176,7 @@ th, td { padding: 0.9rem 1rem; border-bottom: 1px solid #e5eaf0; + vertical-align: middle; } th { diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 9b78400..aab85fd 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -109,9 +109,11 @@ dd { font: inherit; } -.customer-actions { - display: flex; - flex-wrap: nowrap; +/* The cell stays a table cell so its row line and height match the other columns. + The links sit in their own inline-flex wrapper instead. */ +.customer-actions .action-links { + display: inline-flex; + flex-wrap: wrap; align-items: center; gap: 0.75rem; } @@ -159,11 +161,24 @@ body > canvas { } } +/* Three choices sit in one row from tablet up. auto-fit left a 2 + 1 orphan at 768px. */ +@media (min-width: 40.01rem) { + .page-card.choices-page .choice-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} + @media (max-width: 40rem) { .page-card .choice-grid .choice-card { min-height: auto; } + .profile-actions { + flex-direction: column; + align-items: flex-start; + gap: 0; + } + .page-card > .page-heading, .page-card > .filters, .page-card > form.filters { @@ -228,6 +243,11 @@ body > canvas { overflow-wrap: break-word; } + /* The card's own border closes the last field, so drop its row line. */ + .page-card tr td:last-child { + border-bottom: 0; + } + .page-card td .status { width: fit-content; max-width: 100%; @@ -241,14 +261,4 @@ body > canvas { letter-spacing: 0.04em; text-transform: uppercase; } - - .page-card td.customer-actions { - display: flex; - flex-wrap: wrap; - align-items: center; - } - - .page-card td.customer-actions::before { - margin-inline-end: auto; - } }