-
Notifications
You must be signed in to change notification settings - Fork 243
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
Inconsistency in placement of overflow button when SSR prepends sizer element #1155
Comments
Good one! Have you also checked how the AMP Cache handles this? |
I can see it is also prepending the sizer: https://plum--skinny--collard-glitch-me.cdn.ampproject.org/c/s/plum-skinny-collard.glitch.me/ |
Can you file an internal bug as well?
… |
Done: b/181895985 Interestingly, I'm also now seeing the AMP runtime prepending the |
Seems I was seeing |
In ampproject/amp-wp#5926 I noticed that the
button[overflow]
element was being hidden due to being positioned outside of the parent element:On non-SSR'ed pages, the preview button appeared at the top inside of the element.
The issue is that on SSR'ed pages, a responsive
amp-iframe
will get:Whereas on the non-SSR'ed page, this is absent:
The
i-amphtml-sizer
is pushing the computedtop
for thebutton
to be the same as theheight
of the sizer, which causes it to move out of view.We worked around the issue by adding this style rule to consistently place the absolutely-positioned button at the bottom of the container:
Nevertheless, I think SSR should consider appending the
i-amphtml-sizer
element rather than prepending in order to ensure consistency when SSR'ed.Playground examples:
The text was updated successfully, but these errors were encountered: