Styling auto-injected phoenix div between layout and @inner_content?

Hello, I’m wondering if there’s any way in Phoenix to add a class or styles to the div that gets injected automatically between the layout html code and @inner_content?
I want to set the height of the body to 100%, but the height gets reset by that div so you can’t use height: 100% afterwards. I tried setting the height to 100vh right after that div, but that ended up revealing the hidden iframe created by LiveView.
So I ended up adding [hidden] { display: none !important; } to my CSS to get rid of the iframe at the bottom of the page which was showing up in both Chrome and Safari when using height: 100vh.
I could be totally wrong about approaching all of this and if so sorry for wasting your time! If anyone else has run into this issue and knows a better solution I would appreciate any ideas. I love learning LiveView! Thanks!

I believe this is what you’re looking for https://github.com/phoenixframework/phoenix_live_view/blob/b203a21de7a663093d92d24ce85adde5bc4e4484/lib/phoenix_live_view.ex#L455

3 Likes

Thanks @mhanberg!

1 Like

Is there a similar setting for non-liveview layouts?

A normal layout doesn’t inject inject markup, so there is no such option needed.

that’s odd, my @inner_content is getting wrapped in a div automagically