AS / feature add typography#3
Open
ashleystringer wants to merge 4 commits into
Open
Conversation
masuyama13
reviewed
May 25, 2026
Collaborator
There was a problem hiding this comment.
In my opinion, it would be better to define typography in global.css using @layer base. Since these are default styles for semantic elements like h1, h2, and body, this approach feels simpler and more lightweight than creating separate Astro components for each heading level.
https://tailwindcss.com/docs/adding-custom-styles#adding-base-styles
For example:
@layer base {
body {
font-family: var(--font-lato);
font-size: var(--text-base);
font-weight: var(--font-weight-normal);
line-height: var(--text-base--line-height);
}
h1, h2, h3, h4, h5 {
font-family: var(--font-lato);
font-weight: var(--font-weight-semibold);
}
h1 {
font-size: var(--text-5xl);
line-height: var(--text-5xl--line-height);
}
/* ... */
@media (min-width: 64rem) { /* 1024px */
body {
font-size: var(--text-lg);
font-weight: var(--font-weight-normal);
line-height: var(--text-lg--line-height);
}
h1 {
font-size: var(--text-6xl);
line-height: var(--text-6xl--line-height);
}
/* ... */
}
}
masuyama13
reviewed
May 25, 2026
|
|
||
| <body class={headerType}`> | ||
| <slot/> | ||
| </body> No newline at end of file |
Collaborator
There was a problem hiding this comment.
Please make sure to add a blank line at the end of each file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes...
This PR adds typography globally to the website in accordance with the requirements outlined in the Jira Ticket and its corresponding Figma file.
What I did...
How to test...
There's likely a better and more professional way to test this, but this was admittedly a little post hoc.