Closed aharvard closed 2 years ago
Sure @davidnixon! The issue starts becoming apparent above 1300px screen widths due to the height of the hero GIF being maxed at 500px. Here's are some videos showing before/after at a couple large resolutions.
Maximized Chrome window on Retina 15" MacBook Pro
Maximized Chrome window on Retina 15" MacBook Pro
As I recorded the above, I realized that we could do one more thing to decrease the likelihood of an awkward crop.
For screen sizes above 1300px, we could increase the max-height of the GIF to be relative to the viewport width.
This increase in height could throw off the aspect ratio of the hero, but we can dial it in to strike a balance between face cropping and original design intent.
Please advise if y'all would like me to make this adjustment.
thanks so much @aharvard ! @davidnixon @sebastianhuynh-nyc does this look good to merge?
also @aharvard would love to invite you to join our Hacktoberfest Demo Day if you're available on October 29th https://www.crowdcast.io/e/hacktoberfest-demo-day/register.
We'd also love for you to walk us through this PR/and or others you've done for Call for Code for Racial Justice during Hacktoberfest during this Demo Day event (once we get this PR merged!). Let me know if you're interested in that as well!
We'd also love for you to walk us through this PR/and or others you've done for Call for Code for Racial Justice during Hacktoberfest during this Demo Day event (once we get this PR merged!). Let me know if you're interested in that as well!
@demilolu, I'd be happy to do that!
perfect! please join us in our slack channel callforcode.org/slack and DM me @ demi ajayi to get started.
@davidnixon is this live on the site? It still looks like it's cutting off on my end.
@aharvard sent you a DM in Slack so you can join us on streamyard tomorrow (we're using a different site that the audience crowdcast site).
Contributes to #230
What did you do?
Added
object-position: top
to the.hero__image
in_hero.scss
Why did you do it?
230 identified a layout problem on wide screens where the hero was cutting off faces. The root cause is due to the
object-fit: cover
rule and the deafult behavior for image scaling and positioning. Settingobject-position: top
maintains the scaling behavior but positions the image so that most faces won't get cut off.I considered changing the
object-fit
tocontain
however that dramatically changes the aesthetic by loosing the full-bleed look.How have you tested it?
Tested in the browser, on a 15" Mac Book Pro with a resolution of 1920 x 1200 and zoomed out the browser content to render ~2800px wide. Images seem to hold up nicely in this range w/out too much cutting off.
Were docs updated if needed?
Type of change
Checklist: