Replies: 1 comment
|
Sorry for the delay... I assume you have resolved your issue by now. I guess the color is lost to keep a consistent styling across the different pages. And, in part 4, the font-size is now defined in the global stylesheet. This is indeed a solution. Another one would be to add the following to the <style>
:global(h1) {
color: purple;
}
</style>or even It seems the tutorial now mentions that https://docs.astro.build/en/tutorial/4-layouts/1/#try-it-yourself---use-your-layout-everywhere and the issue is solved. I'm closing this, but if you think this is a mistake and that this discussion should remain open, please feel free to ping me, I'll take a second look at it. Thank your for your contribution! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi. There is something about the "Build a Blog" tutorial that confuses me.
As of part 4 of the tutorial, H1 of the About page has its own styles:
It is documented here.
However, on part 4, readers are expected to refactor common elements into a pay layout called BaseLayout.astro. h1 is removed to this BaseLayout component.
About page should now look like this.
H1 of About page no longer has purple text and font size
4rembecause there is no h1 element in the About page.It is not mentioned in the doc, but I assume that H1 styling should remain the same.
How do I style only h1 of the About page now? The only method I know is:
BaseLayoutin the About page. Let's call it "about"All reactions