-
Notifications
You must be signed in to change notification settings - Fork 103
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: course image height on IOS Safari #553
base: master
Are you sure you want to change the base?
fix: course image height on IOS Safari #553
Conversation
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
Thanks for the pull request, @Cup0fCoffee! This repository is currently maintained by @2U-aperture. Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #553 +/- ##
=======================================
Coverage 97.35% 97.35%
=======================================
Files 154 154
Lines 1362 1362
Branches 228 229 +1
=======================================
Hits 1326 1326
Misses 34 34
Partials 2 2 ☔ View full report in Codecov by Sentry. |
@Cup0fCoffee I'm hesitant to bring in more SCSS overrides in this repo, especially when it originates in Paragon and ideally the fix could be made there. However, I know that Learner Dashboard is stuck on v22 due to its dependency on |
@jsnwesson My initial thought process was that this fix is only applicable in this context, and adding it to Paragon would mess up other cases where these styles are used, so adding it as a custom rule made sense to me. I thought this answer is good enough, but they I had another look, and reconsidered. I found three issues and one closed PR related to the same issue:
From them I learned the following things:
So to answer your question:
To fix this issue through Paragon, it would be necessary to:
I don't see an easy solution for #1 and the rest could take quite some time. However, as a compromise, we could keep this fix local for now, to fix this issue early, and at the same time, instead of using custom styles tucked away in a SCSS file where they could get forgotten, we could add a What do you think about that? Does that address your concerns? |
@Cup0fCoffee phew, thanks for doing the digging! I completely agree that the time to make the fix in Paragon could take time, and I know there's already a blocker being experienced with getting the MFEs to v23 anyways, so the alternative fix you suggest sounds like a great compromise. |
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