You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's because the amp-img is getting display:inline-block whereas non-AMP img has display:block. In particular, it's because Twenty Twenty has this CSS:
I have an initial fix in #4421 specific for Twenty Twenty. It works by prepending a style rule to style[amp-custom] which sets amp-img to have display:block, with a selector that is specific enough to be weightier than .i-amphtml-layout-intrinsic.
There may be an opportunity to generalize this fix at the CSS parser level. For example, if coming across a selector that has just img and the rule includes display:block, then this could automatically result a style rule being added like:
.amp-block-img { display:block }
While at the same time adding the amp-block-img class to every amp-img. This should be more robust/automatic, though I can imagine there would be more edge cases. Namely, images added via amp-list or amp-script.
Bug Description
Pair browsing of an AMP-first site in Transitional mode shows visual differences on image layouts.
Expected Behaviour
There should be no visual disparities.
Steps to reproduce
Screenshots
Additional context
Version: 1.5.0-RC1
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: