Open
Description
I'm using this inside of a vue directive to try and fix text to it's container, however it does not seem to actually do anything except set the font size to the max I allow.
Watching the fit
event shows no change even when I manually trigger the fit()
function on the element.
The relevant markup looks like:
<div> <!-- div1 max-width = 150px -->
<div> <!-- div2 no styling -->
<span>Some long text goes here</span> <!-- The element that is fitty() -->
</div>
</div>
The span
that I am using fitty()
on it larger than div 2
since the text causes it to overflow, which seems to be what fitty expects?
Other Info:
- The text element is not forced to be the same size as the parent
- The parent has no padding
- Even when changing the text, the font-size is never changed by fitty when it triggers
fit
from the dom change - If I manually constrain the parent container by setting it's
max-width
, and then callingfit()
, it still does not change the text's size to anything but the max
Metadata
Metadata
Assignees
Labels
No labels