-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add container height as part of the calculation #69
base: gh-pages
Are you sure you want to change the base?
Conversation
Restrict by height as well as width when calculating
Thanks, I'll try to look into this as soon as possible but I'm swamped with other work right now, hope to have some more time in february. |
Appreciate the PR, but I've decided to leave this out for now, as I feel it's probably not what most devs need, if that changes then I'll reconsider. Will leave open. |
@rikschennink as per issue #9 there appears to be longstanding interest in functionality to scale text by the parent container's vertical size. This PR seems to address that issue, and would meet the needs of all those other devs. I'd like to also add my voice to this, and encourage you to reconsider merging this PR |
@cwdott see my last reply. |
From 3 months ago, just above mine? That's the one I was addressing in my comment 😊 |
Thanks for this PR, really appreciate it. Its exactly what I needed. Maybe we can integrate it into the main branch, but disable it per default to prevent breaking changes. Would be nice! |
Restrict by height as well as width when calculating the font size to ensure fonts fit within a container, for example when rotated or using a top to bottom language.
This limit may not be what the majority of users want so a possible update could be to add an option to restrict by height and width, only width or only height.
Closes #9
Codesandbox: https://codesandbox.io/s/fitty-horizontal-vertical-wq7qn