I want to tell the browser: make this text as big as possible without scrolling.
no plus ones
Shared publicly•View activity
- any ideas?Sep 6, 2012
- I'm pretty sure there's no way to do it with HTML and CSS alone; the text kerning and wrapping characteristics are complicated enough that any HTML+CSS implementation would have the browser doing a similar loop behind the scenes, and CSS seems to mostly avoid that. You can speed it up by using a binary search instead of small increments (with some possible caveats where it's not monotonic), but I'm pretty sure there's no closed-form solution.Sep 6, 2012
- "It looks like manual line wrapping is appropriate for this use case"
I'd like this to work on things with different aspect ratios. It's nice that the current solution looks good on my laptop as well as my phone. The other problem with manual line breaking is then I need to be testing how each one looks, instead of just letting the browser sort it out.Sep 7, 2012
- This is basically what my code for fitting text on my cards looks like, though I multiple the font size by .7 or something instead of subtracting a value. Mine actually doesn't do any wrapping, which I think I'm going to add next. Also, I need to do a bunch of work on my card database. Perhaps I'll go work on that.
How does your database store the dances? Are they text or semantic?Sep 7, 2012