You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a heading on a website that I'd like to fit, however, on small screen I split up the header in two lines. I do this by having one single line title, and a split up version:
<divid="title_full">
MY TOOOOOOO LOOOOOONG TITLE
</div><divid="title_parts"><divid="title_part_one">MY TOOOOOOO</div><divid="title_part_two">LOOOOOONG TITLE</div></div>
This works great, but it seems to break fitty. It works fine when opening the website, but when rezising the window in such a way that it swaps between these two titlee the fitting breaks.
Is there some setting I should use to make this work?
The text was updated successfully, but these errors were encountered:
So I just realised that display: none actually removed stuff from the DOM, and thus Fitty won't work (as per the readme). And apparently Fitty doesn't re-initialize when something is added to the DOM again, which I guess makes sense.
To solve this, instead of using display: none; I changed it to use
visibility: hidden;
height:0;
That seems to have fixed it. I guess it's a bit more performance intensize, as you're resizing stuff even when it's not shown, but it works for now.
However, the question still stands, is there a way to make Fitty work together with display: none?
Hey!
I have a heading on a website that I'd like to fit, however, on small screen I split up the header in two lines. I do this by having one single line title, and a split up version:
And then hiding them base on media queries:
As scripts I have three
fitty
s for each part.This works great, but it seems to break fitty. It works fine when opening the website, but when rezising the window in such a way that it swaps between these two titlee the fitting breaks.
Is there some setting I should use to make this work?
The text was updated successfully, but these errors were encountered: