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

Added resizeModifier for selectively adding or removing specific fitText() calls #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sawtaytoes
Copy link

Helps with responsive designs where at certain breakpoints the resize operation should no longer take place regardless of a minimum or maximum font-size.

…ext() calls

Helps with responsive designs where at certain breakpoints the resize operation should no longer take place regardless of a minimum or maximum font-size.
@davatron5000
Copy link
Owner

Thanks @Saturn2888 for the commit. This seems really specific to your current implementation and JS breakpoint management dependencies. Would you mind giving some background?

@Sawtaytoes
Copy link
Author

I'm having trouble remembering exactly why this was important so my description here may be lacking.

I remember needing to control FitText.js on particular items independently so it was able to be enabled and disabled using jQuery.off() and $.fitText().

I think I did this to add a method of changing the font-size based on the breakpoint rather than a min or max value; although, I remember there was something else I was hitting up against on a few projects which is why I eventually came to this solution.

It allowed me to disable and enable FitText.js selectively rather than globally. When using it on a bunch of different items, This was very useful. Another benefit I can see is there's no need to constantly eyeball the min or max font sizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants