Skip to content

Preview: Style iframe with height: 100% #6031

@Jones-S

Description

@Jones-S

Description

I am using craft in headless mode and I want to display previews where I load a frontend app from another domain. This works all nicely, but unfortunately the iframe within craft is not set to 100% height. I don't know if this is on purpose, but in my case my page is clipped.
Maybe because the content is not there initially when the iframe loads, or maybe also because I have some sticky footer flex-css stuff going on.

Anyway, would it bother you to set the iframe height to 100%?

I hope the attached images make it more clear:

very narrow iframe:
Screenshot 2020-05-06 at 18 47 00

And now with 100% height:
Screenshot 2020-05-06 at 18 50 13

Additional info

  • Craft version: "craftcms/cms": "3.5.x-dev",
  • PHP version: 7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions