Closed reggi closed 6 months ago
This has never worked very well and I would suggest not doing this. Instead make your layout include the body but pass the props you want to be attached to it.
There is a compiler bug for this already, so going to close this one as a duplicate of https://github.com/withastro/compiler/issues/982
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I have a series of nested layouts and I didn't want the
<body>
tag included in the root layout because I wanted to be able to add custom tailwind. But I realized that astro will ignore a<body>
if it's as a<slot>
to a layout. I think the dom is adding a body when you view the tree, but view source shows no body.What's the expected result?
That I'd be able to set a body from outside the root layout.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-hfbtiv?file=src%2Fpages%2Findex.astro
Participation