docs icon indicating copy to clipboard operation
docs copied to clipboard

Styling part for the layout section of blog tutorial is a little bit confusing

Open devserkan opened this issue 1 year ago • 4 comments

📚 Subject area/topic

Layouts section in Blog tutorial

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/tutorial/4-layouts/1/

📋 Description of content that is out-of-date or incorrect

In the documentation, when giving the instructions for the about.astro page refactor, it says:

(Note: using the BaseLayout to render your about.astro page means you will lose the <style> tag added to the <head> of this page. If you want to keep the custom <h1> style, move the style tag to the body of the page component.)

Even if we do this, the h1 styles are not applied to the page because we are not using h1 in about.astro, so the BaseLayouts styles are applied. I guess this is the default behaviour but in this case the documentation might be confusing for learners. So, maybe there should be a reminder about this is the default behaviour and either we use the element itself in the page or we do not see the styles are applied.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

https://stackblitz.com/github/withastro/blog-tutorial-demo/tree/complete

devserkan avatar Oct 15 '24 21:10 devserkan