Skip to content

Commit

Permalink
🖍 Fix displaying hero images over blurry image placeholder (#35759)
Browse files Browse the repository at this point in the history
* Fix displaying hero images over blurry image placeholder

This is a second attempt at fixing #32387. The first attempt improperly used `.i-amphtml-ssr` (a class selector), when it should have been `[i-amphtml-ssr]` (a property selector).

* Update z-index doc
  • Loading branch information
jridgewell authored Aug 31, 2021
1 parent b19d296 commit 11a2daa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion css/Z_INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| context | z-index | file |
| --------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amp-img.i-amphtml-ssr:not(.i-amphtml-element) > [placeholder]` | auto | [css/ampshared.css](/css/ampshared.css) |
| `amp-img[i-amphtml-ssr]:not(.i-amphtml-element) > [placeholder]` | auto | [css/ampshared.css](/css/ampshared.css) |
| `.i-amphtml-expanded-mode amp-story-grid-layer` | auto | [extensions/amp-story/1.0/amp-story.css](/extensions/amp-story/1.0/amp-story.css) |
| `.i-amphtml-expanded-mode amp-story-grid-layer *` | auto | [extensions/amp-story/1.0/amp-story.css](/extensions/amp-story/1.0/amp-story.css) |
| `amp-sidebar::part(c)` | inherit | [extensions/amp-sidebar/1.0/amp-sidebar.css](/extensions/amp-sidebar/1.0/amp-sidebar.css) |
Expand Down
2 changes: 1 addition & 1 deletion css/ampshared.css
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ amp-img:not(.i-amphtml-element)[i-amphtml-ssr] > img.i-amphtml-fill-content
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] {
amp-img[i-amphtml-ssr]:not(.i-amphtml-element) > [placeholder] {
z-index: auto;
}

Expand Down

0 comments on commit 11a2daa

Please sign in to comment.