Skip to content

Commit

Permalink
Set position of amp img el. inline-block on inner img element. (#36340)
Browse files Browse the repository at this point in the history
  • Loading branch information
processprocess committed Oct 13, 2021
1 parent 06f0de0 commit e9596ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ amp-story-panning-media {

amp-story-panning-media amp-img {
backface-visibility: hidden !important;
/* Width explicitly set for mobile chrome, desktop safari & desktop firefox. */
width: 100% !important;
height: 100% !important;
}

amp-story-grid-layer[template="fill"] amp-story-panning-media amp-img img {
/* override for layout=fill */
position: relative !important;
display: block !important;
display: inline-block !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ export class AmpStoryPanningMedia extends AMP.BaseElement {
right: 'auto',
top: '0',
bottom: '0',
width: 'auto',
height: '100%',
});
setImportantStyles(imgEl, {
width: 'auto',
Expand All @@ -306,6 +308,8 @@ export class AmpStoryPanningMedia extends AMP.BaseElement {
right: '0',
top: 'auto',
bottom: 'auto',
width: '100%',
height: 'auto',
});
setImportantStyles(imgEl, {
width: '100%',
Expand Down

0 comments on commit e9596ec

Please sign in to comment.