Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Add fallback size to hero so it doesn't shift. #2125

Merged
merged 1 commit into from
Feb 6, 2020
Merged

Conversation

robdodson
Copy link
Contributor

@robdodson robdodson commented Feb 6, 2020

I noticed most blog posts shift a lot as they load their hero image. I believe giving them width and height fallback attributes is the approved way to define their intrinsic size (thread) and seems to help mitigate a lot of the shifting.

Related css-tricks post.

Changes proposed in this pull request:

  • Add width and height fallback attributes to hero image to prevent layout shift.

@googlebot googlebot added the cla: yes Contributor has signed the CLA label Feb 6, 2020
@netlify
Copy link

netlify bot commented Feb 6, 2020

Deploy preview for web-dev-staging ready!

Built with commit 0092359

https://deploy-preview-2125--web-dev-staging.netlify.com

@robdodson robdodson merged commit f170859 into master Feb 6, 2020
@robdodson robdodson deleted the bug/fix-hero-size branch February 6, 2020 23:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Contributor has signed the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants