Closed desandro closed 10 years ago
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.
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
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.
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.
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.