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

[BB-9429] fix: course image height on IOS Safari #4

Conversation

Cup0fCoffee
Copy link
Member

@Cup0fCoffee Cup0fCoffee commented Jan 20, 2025

Backport of: openedx#553

Description

Course thumbnails on IOS Safari stretch to the full height of the image, instead of being limited by width and preserving aspect ratio. This seems to be a IOS Safari specific behavior[1], and can be fixed by setting height to auto, while width is set to 100%.

This issues is specific to the context of the course card, so we are fixing it by setting the height in the course card css, instead of fixing it globally in the Paragon styles, which wouldn't work in all contexts.

1: https://stackoverflow.com/a/44250830

Screenshots

Screenshots taken from an iPhone of the same course on the course dashboard before and after the fix. Course name censored for privacy.

Before
After

Course thumbnails on IOS Safari stretch to the full height of the image,
instead of being limited by width and preserving aspect ratio. This
seems to be a IOS Safari specific behavior[1], and can be fixed by
setting height to auto, while width is set to 100%.

This issues is specific to the context of the course card, so we are
fixing it by setting the height in the course card css, instead of
fixing it globally in the Paragon styles, which wouldn't work in all
contexts.

1: https://stackoverflow.com/a/44250830
@Cup0fCoffee Cup0fCoffee merged commit 14e4ea2 into opencraft-release/redwood.1-krach-institute Jan 20, 2025
3 checks passed
@Cup0fCoffee Cup0fCoffee deleted the maxim/bb-9429-fix-course-image-height-on-ios branch January 20, 2025 22:03
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