Skip to content

display: none breaks fitting #90

@TheOddler

Description

@TheOddler

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:

<div id="title_full">
    MY TOOOOOOO LOOOOOONG TITLE
</div>
<div id="title_parts">
    <div id="title_part_one">MY TOOOOOOO</div>
    <div id="title_part_two">LOOOOOONG TITLE</div>
</div>

And then hiding them base on media queries:

#title_full {
      @media(max-width: $smart-header-cutoff) {
        display: none;
      }
     ...
}

#title_parts {
      @media(min-width: $smart-header-cutoff) {
        display: none;
      }
     ...
}

As scripts I have three fittys 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions