Skip to content

[UGUI] <br> tag is not respected when considering line height #72

@Muchaszewski

Description

@Muchaszewski

When splitting a text into multiple lines, the <br> tag is not considered with the line-height parameter.

Syntax tried (note that some are not valid in JSX, but HTML renders them properly)

<span style="line-height: 2rem;">This is multiline<br>text that we comapre</span>
<span style="line-height: 2rem;">This is multiline<br/>text that we comapre</span>
<span style="line-height: 2rem;">This is multiline</br>text that we comapre</span>
<span style="line-height: 2rem;">This is multiline<br></br>text that we comapre</span>

The only syntax that works is variable injected string

    <span style="line-height: 2rem;">{`This is multiline
text that we comapre`}</span>


should keep the same properties as a manual break line
image

More correct result (See #71 for more info about line-height issue)
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    browser-renderingIssues where there is an incompatibility between how browser renders the UI and how ReactUnity does

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions