Open Sawtaytoes opened 10 years ago
Thanks @Saturn2888 for the commit. This seems really specific to your current implementation and JS breakpoint management dependencies. Would you mind giving some background?
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.
Helps with responsive designs where at certain breakpoints the resize operation should no longer take place regardless of a minimum or maximum font-size.