-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation regarding usage of style
tags in components containing html
tags (i.e. layout components)
#8603
Comments
Can confirm the suggestion is valid based off Issue linked & withastro/astro/blob/main/examples/blog/src/layouts/BlogPost.astro. Hit your PR right away 馃槈 |
I saw the discussion and agree it seems to be something that needs documenting! I will point out though, that a call out is probably NOT the way to do this. ;) Cautions and warnings are for: security risk, might lose data, set your house on fire etc. In general, "how things work" is not a special note, it's just part of regular documentation! So, I would encourage you to look for where, in normal paragraph text, this content makes sense to add! Then, I'll help edit it and get it over the finish line. 馃挭 |
@sarah11918 Thanks, good point regarding the callout. I will write something up later today and send it through. I can also send through a German translation at the same time, I presume I'd do that in a separate PR? |
Yes! The German would be in a 2nd PR, thanks! Especially since you won't know for sure what the final English version will be until Team Docs is finished reviewing and possibly editing it, it saves work by not doing the translation too early. 馃檶 |
馃搵 Explain your issue
I'm opening this issue to ask for advice on fixing a gap in the documentation regarding layout components. The issue is that if a layout component contains an
html
tag, anystyle
tags (this might also apply toscript
tags?) need to be nested inside thehtml
tag. This is different to how astro components normally behave where thestyle
tag is usually placed outside of any other tags.Example
The behaviour and workaround was confirmed in this issue.
Suggestion
I think this would make sense to explain in a callout box on the layouts page. Something akin to
Warning
A
style
tag in an Astro component containing anhtml
tag must be nested inside thehtml
tag.I don't think I have seen this mentioned anywhere else in the docs, but I might have overlooked it. Ideally this should trigger at least a linter warning in the language tools, but getting it documented would be a good start.
More than happy to send a PR!
The text was updated successfully, but these errors were encountered: