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

Proportion sizing #30

Closed
wants to merge 3 commits into from
Closed

Proportion sizing #30

wants to merge 3 commits into from

Conversation

desandro
Copy link

This is a little bit more code, and adds some simple CSS to the <head>, so if its defying all the principals of FitText, feel free to not pull it.

But this is a more better version. It gets the proportion of the size of the item and its font-size, and then uses that to fit into the size of its parent. .fit-text { display: inline-block; } helps with getting the right size.

Now we don't have to rely on that hacky compressor value to get the perfect justified sizing.

Adds CSS `display: inline-block` to work

Resolves relying on compressor to fix for perfect sizing
@davatron5000
Copy link
Owner

Just wanted to let you know I haven't been ignoring this, just been lazy. Thanks for the commit, David. Looks wonderful, just want to give it a run through before merging it.

@desandro
Copy link
Author

I don't know, Dave. We used to be something. Now, I come back home, and you don't even pull away from your screen to say hello to me. I bought that DVD box set for you, but we still haven't watched it together, like you said we would. I feel like we've been moving in different directions for a long time now. We both know it, but have been too afraid to say anything.

This pull request.... This could be the start of something new. This could be where we pull it together. I want to make this work. And I hope you're willing to give us another chance.

xoxo -dd

@daneden
Copy link

daneden commented May 24, 2012

@davatron5000
Copy link
Owner

Finally took a look at this, David. I really like it. However, having text break into multiple lines is a feature of FitText not a bug. There are other issues (#90, #80, #6) about auto-calculation, but all have the same problem of not supporting multiple lines.

I am interested in a possible noBreak : true option if you know/want your text to be on a single line auto-calc'd. Just want to make sure we have a super elegant solution.

I'll tag this on the 1.5 milestone and hopefully we can get that feature rolled in.

@desandro
Copy link
Author

Yeah, I took a look at this again too and I think it's trying to achieve something a bit different from what you're going for. The code's now 2 years olds so I'm not feeling too hot about adding <style> and css classes.

I'm closing this PR. 2 years, what a run.

@desandro desandro closed this Nov 29, 2013
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.

3 participants