Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(create-vite): update templates to use better font #11665

Merged
merged 2 commits into from
Jan 16, 2023
Merged

fix(create-vite): update templates to use better font #11665

merged 2 commits into from
Jan 16, 2023

Conversation

mayank99
Copy link
Contributor

@mayank99 mayank99 commented Jan 12, 2023

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 used 1.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?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@mayank99 mayank99 changed the title Update create-vite templates to use better font create-vite: Update templates to use better font Jan 12, 2023
@mayank99 mayank99 changed the title create-vite: Update templates to use better font fix(create-vite): Update templates to use better font Jan 12, 2023
@mayank99 mayank99 changed the title fix(create-vite): Update templates to use better font fix(create-vite): update templates to use better font Jan 12, 2023
@bluwy bluwy merged commit a65d31b into vitejs:main Jan 16, 2023
@bluwy
Copy link
Member

bluwy commented Jan 16, 2023

Thanks @mayank99! If you'd like, there's tons more to update at https://github.com/bluwy/create-vite-extra too. Otherwise I can also update them when I find the time.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants