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

BigText stops working when required font-size is less than 24px #134

Open
Tomtids opened this issue Sep 28, 2017 · 1 comment
Open

BigText stops working when required font-size is less than 24px #134

Tomtids opened this issue Sep 28, 2017 · 1 comment

Comments

@Tomtids
Copy link

Tomtids commented Sep 28, 2017

I'm working on a responsive website at the moment and bigtext.js is working great on resizing my title within a fluid box UNTIL the font-size would need to be less than 24px. At this point instead of continuing the size the font down by 0.1 increments the font-size jumps to 10px. When the box gets wider the text remains at 10px until it can jump to 24px again.

Is there a way to override this behaviour so it continues to scale please?

@Tomtids
Copy link
Author

Tomtids commented Sep 29, 2017

I've found a solution for my issue. When the font size gets small the 'autoGuessSubtraction' which is set at 32px was meaning that a negative font size was being applied to the element. This meant that the inline style was being correctly ignored by the browser (you can't have a negative font size!) so it was falling back to the default size of 10.

By setting 'autoGuessSubtraction' to 0 everything seems to work fine.

I'm not clear what 'autoGuessSubtraction' is supposed to do (i've not figured out the whole plugin yet), but I hope this fix won't cause any longer term issues or surprises when I browser test!

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

No branches or pull requests

1 participant