From 8ada6eb03310d38346f40a6f2749375050adc784 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Fri, 24 Jul 2026 14:52:56 +0000 Subject: [PATCH] Let hero stats cards auto-expand to fit long values. Replace fixed mobile widths and equal grid columns with content-sized cards so figures like GHS balances and storage sizes are never clipped. --- resources/css/app.css | 10 ++++++++-- resources/views/components/care/page-hero.blade.php | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 7accbdc..95e41f4 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -101,7 +101,10 @@ html.qr-mobile-page body { } .mobile-stats-card { - width: calc(66.666667% - 0.5rem); + width: max-content; + min-width: 9rem; + max-width: none; + box-sizing: border-box; } @layer components { @@ -334,7 +337,10 @@ html.qr-mobile-page body { @media (min-width: 640px) { .mobile-stats-card { - width: auto; + width: max-content; + min-width: 9rem; + max-width: none; + flex: 1 1 auto; } } diff --git a/resources/views/components/care/page-hero.blade.php b/resources/views/components/care/page-hero.blade.php index e9e46b8..506d388 100644 --- a/resources/views/components/care/page-hero.blade.php +++ b/resources/views/components/care/page-hero.blade.php @@ -25,11 +25,11 @@ @if (count($stats) > 0) -
+
@foreach ($stats as $stat) -
-

{{ $stat['value'] }}

-

{{ $stat['label'] }}

+
+

{{ $stat['value'] }}

+

{{ $stat['label'] }}

@endforeach