From 72c3ab9f9934e132056b4b196df72eda6b0a16e2 Mon Sep 17 00:00:00 2001 From: John Wesely Date: Wed, 23 Sep 2026 11:12:13 -0600 Subject: [PATCH 1/2] fix: contain landscape image steps on mobile Class on the img used a 16:9 max-width from viewport height, so landscape images overflowed the card. Co-authored-by: Cursor --- dist/filament-lms.css | 3 +- resources/css/plugin.css | 3 +- .../views/livewire/document-step.blade.php | 14 ++-- resources/views/livewire/image-step.blade.php | 12 ++-- tests/Feature/ImageStepTest.php | 70 +++++++++++++++++++ 5 files changed, 89 insertions(+), 13 deletions(-) create mode 100644 tests/Feature/ImageStepTest.php diff --git a/dist/filament-lms.css b/dist/filament-lms.css index b589c88c..ca2c4fa2 100644 --- a/dist/filament-lms.css +++ b/dist/filament-lms.css @@ -22,8 +22,9 @@ /* Centralized step material sizing */ .step-material-container { + width: 100%; height: 60vh; - max-width: calc(60vh * 16/9); + max-width: min(100%, calc(60vh * 16 / 9)); margin: 0 auto; } diff --git a/resources/css/plugin.css b/resources/css/plugin.css index b589c88c..ca2c4fa2 100644 --- a/resources/css/plugin.css +++ b/resources/css/plugin.css @@ -22,8 +22,9 @@ /* Centralized step material sizing */ .step-material-container { + width: 100%; height: 60vh; - max-width: calc(60vh * 16/9); + max-width: min(100%, calc(60vh * 16 / 9)); margin: 0 auto; } diff --git a/resources/views/livewire/document-step.blade.php b/resources/views/livewire/document-step.blade.php index 678f48db..1c808513 100644 --- a/resources/views/livewire/document-step.blade.php +++ b/resources/views/livewire/document-step.blade.php @@ -4,12 +4,14 @@ class="flex-1 flex flex-col" >
@if($this->getPreviewImage()) - Document Preview Image +
+ Document Preview Image +
@elseif ($document->hasScormPackage())