-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fixes #408 Set Aspect Ratio and Object Fit #409
Merged
gerbrent
merged 1 commit into
JupiterBroadcasting:main
from
ChanceM:bug/fix-show-host-image
Sep 8, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ | |
height: 100% !important | ||
&__is-fullwidth | ||
width: 100% !important | ||
&__set-1by1 | ||
aspect-ratio: 1/1 | ||
object-fit: cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the Bulma
is-square
oris-1by1
work for this? Or is theobject-fit: cover
not included in that?https://bulma.io/documentation/elements/image/#responsive-images-with-ratios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately no, I did try those first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
custom__set-1by1
is-square
is-1by1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice trial&error ; )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More like attempt to use the "supported" styles/classes before adding custom parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that gets me thinking then: should we use the "supported" methods differently to create all of the thumbnails?
As in: is this a band-aid, or should we be revisiting how the thumbnails get generated more generally to cover these edge cases? Is there a better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will provide greater coverage should an image not meet a 1:1 aspect ratio. I'm not exactly sure where they are pulled from or if JB can exert full control over them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of the images were scraped by the scraper from Fireside. The images thus were necessarily previously ingested by Fireside's process and likely made to conform to a specific standard.
Alex' photo is the first to be replaced independent of Fireside - he applied it here as a PR - and thus is the first case of integrating non-standard photos into our site here.
THAT is the difference, and why all a sudden Alex' photo is problematic.
Likely we will need to test a variety of images to see how Hugo & company manage their integration seamlessly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of tangentially related, talked about images sizing here a bit: #326 (comment)