diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8204f9b..fe433a2 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -66,12 +66,13 @@ export class AppComponent implements OnInit { } private resizeParentIframe() { - const height = document.documentElement.scrollHeight; + const body = document.body; + const html = document.documentElement; + const height = Math.max(body.scrollHeight, body.offsetHeight, html.offsetHeight); const message = { type: 'resizeIframe', value: height }; - console.log(message) window.parent.postMessage(message, "*"); } } diff --git a/src/styles.scss b/src/styles.scss index 72a312b..28fa210 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -34,13 +34,20 @@ body { letter-spacing: 0.2px; -webkit-font-smoothing: auto; -moz-osx-font-smoothing: grayscale; -} -#container { - background-color: white; - min-height: 100vh; + #container { + background-color: white; + min-height: 100vh; + } + + &.iframe { + #container { + min-height: unset; + } + } } + .container { max-width: 1280px; margin: 0 auto;