fix(create-vite): update templates to use better font #11665
Merged
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.
Description
Hardcoding a pixel value for
font-size
on the root element is bad for accessibility because it overrides user preferences (specified in browser/OS settings).16px
is already the default in all modern browsers, so I've removed it. For line-height, a unitless value is recommended, so I've used1.5
(because 1.5 x 16 = 24). Any changes so far should be minimal.I know this is just a template that gets cleared by most devs. But even templates should encourage best practices; it's especially handy for new devs.
Unrelated: While I was there, I also added
system-ui
to the font stack. This is an OS-adaptive font that should look nice on every platform. I can undo this change if it's undesirable.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).Ideally, include relevant tests that fail without this PR but pass with it.