Skip to content

Font size doesn't update, when the height of the div is reduced. #83

@Johannes5

Description

@Johannes5

Demo video:
https://www.loom.com/share/e1a54f0ee4ac4d6c93fedf24c100ec8d

When the text length changes from a length spanning multiple lines, to a smaller text requiring only one line, the font size doesn't update. It will keep its previous font size until the length of the incoming text spans more than one line and shifts the height of the div back to i's maxHeight.

the API is used like this
title={(<Textfit max={20}> {article.title} </Textfit>)}

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