Skip to content

Commit

Permalink
Ensure that children of responsive elements cannot overflow element u…
Browse files Browse the repository at this point in the history
…ntil build time.

Fixes ampproject#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`.
  • Loading branch information
cramforce committed Jul 7, 2017
1 parent 439823a commit e61cfd6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions css/amp.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e61cfd6

Please sign in to comment.