Skip to content
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

Use percentage for html font-size #188

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

MartinRosenberg
Copy link

Sets font-size for html to 93.75% instead of 15px, as using px for root font-size creates an accessibility issue by preventing users' default font sizes from being applied.

The tradeoff for this approach is possible compatibility issues for third-party CSS, but I imagine anyone using Tufte CSS isn't looking to complicate their design anyway.

@joshwcomeau wrote a helpful article about the use of different size units w/r/t accessibility, in which he also provides other solutions to this, though I think the percentage would work just fine here without requiring a refactor.

Sets font-size for html to 93.75% instead of 15px, as using px for root font-size creates an accessibility issue by preventing users' default font sizes from being applied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant