You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✗ npx astro info
Astro v4.7.0
Node v21.7.3
System macOS (arm64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/tailwind
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.
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 withastro/compiler#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
The text was updated successfully, but these errors were encountered: