From e61cfd6e76e606bda4e3e11bf1c26f5cb54a5fb9 Mon Sep 17 00:00:00 2001 From: Malte Ubl Date: Fri, 7 Jul 2017 08:41:01 -0700 Subject: [PATCH] Ensure that children of responsive elements cannot overflow element until build time. Fixes #9397 This change is dangerous and might break things, but I think it is the right thing to do. Children of `layout=responsive` elements should not be allowed to effect the height of the element. This should probably be extended to `fixed-height`. --- css/amp.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/css/amp.css b/css/amp.css index 7f35617ba467..4d37b165eefb 100644 --- a/css/amp.css +++ b/css/amp.css @@ -153,6 +153,14 @@ html.i-amphtml-ios-embed.i-amphtml-ios-overscroll > #i-amphtml-wrapper { position: relative; } +/** + * Children of responsive elements should not be able to influence the height + * which they do when they are statically positioned. + */ +.i-amphtml-layout-responsive > :not(i-amphtml-sizer) { + position: absolute; +} + .i-amphtml-layout-fixed-height { display: block; position: relative;