-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code library: Fluid typography #196
Comments
blvdmitry
changed the title
Project Sizing for better UX, DX, and Accessibility
Fluid typography
Apr 3, 2024
This is finally happening in v3 🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
A site cannot be fully accessible if it is based on pixels, as you are ignoring the user's preferences to update their browser font size settings. Furthermore, working in pixels does not make the UX fluid: the elements will scale only at certain breakpoints, creating awkward design scenarios on certain devices.
Describe the solution you'd like
Having the ability to set the html font size when creating a new theme, and then setting body to 1 rem by default. The snippet will look like something like this
html { font-size: calc(0.625rem + 0.41666666666666663vw); }
@media screen and (max-width:1920px) { html { font-size: calc(0.625rem + 0.41666666666666674vw); } }
@media screen and (max-width:1440px) { html { font-size: calc(0.8126951092611863rem + 0.20811654526534862vw); } }
@media screen and (max-width:479px) { html { font-size: calc(0.7494769874476988rem + 0.8368200836820083vw); } }
Please see here for more details https://finsweet.com/client-first/docs/fluid-responsive
The benefits are multiple (please see video below and link above):
Describe alternatives you've considered
This video goes at length on why this solution makes a lot of sense https://finsweet.com/client-first/wizardry-comparison
The text was updated successfully, but these errors were encountered: