Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: address full-image-container spill and overflow w/ aspect-ratio #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rdela
Copy link

@rdela rdela commented Aug 2, 2024

Depending on the screen size min-height/max-height were causing images to obscure critical interface elements and introducing gaps beneath the container. aspect-ratio achieves a superior effect w/o any of these undesirable behaviors.

.full-image-container {
-	min-height: 600px;
-	max-height: 1000px;
+	aspect-ratio: 16 / 9;

Screenshots

BEFORE AFTER
BEFORE-1728px-2024-08-02-1146 AFTER-1728px-2024-08-02-1138
1728px W @ 2x = 3456px W reduced 2/3 to 1152px W for GitHub, 107K 1728px W @ 2x = 3456px W reduced 2/3 to 1152px W for GitHub, 98K
BEFORE-664px-2024-08-02-1147 AFTER-664px-2024-08-02-1147
664px W @ 2x = 1328px W reduced 1/2 to 664px W for GitHub, 70K 664px W @ 2x = 1328px W reduced 1/2 to 664px W for GitHub, 67K

PS Love the auto-generated name of the live demo: https://endless-iris.cloudvent.net/ ♾️ 👁️

Depending on the screen size min-height/max-height were causing images
to obscure critical interface elements and introducing gaps beneath the
container. aspect-ratio achieves a superior effect w/o any of these
undesirable behaviors.
@rdela
Copy link
Author

rdela commented Aug 16, 2024

I have a preview up at https://fuscia-microphone.cloudvent.net/ now that has this fix along with #4 & #5

that builds off https://github.com/rdela/campus-spark-bookshop-template/tree/dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant