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

Fix displaying hero images over blurry image placeholder #32806

Merged
merged 2 commits into from
Feb 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions css/ampshared.css
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,14 @@ amp-img:not(.i-amphtml-element)[i-amphtml-ssr] > img.i-amphtml-fill-content
z-index: 1;
}

/* We reset the z-index of blurry image placeholders for images that are
rendered by the server and are not (yet) controlled by JS to speed up
display of the real image. This conveniently also fixes the display of
the image when JS fails to load. */
amp-img.i-amphtml-ssr:not(.i-amphtml-element) > [placeholder] {
z-index: auto;
}

.i-amphtml-notbuilt > [placeholder] {
display: block !important;
}
Expand Down