Skip to content

Span renders line break as zero #813

@tsonevn

Description

@tsonevn

From @triniwiz on May 22, 2017 11:26

In 2.5.x i used the following to get a simple icon above some text design

<Button [nsRouterLinkActiveOptions]="{exact:true }" [nsRouterLinkActive]="['active']" [nsRouterLink]="item.menuLink" textWrap="true">
        <FormattedString>
            <Span [icon]="item.icon" [fontSize]="item.size ? item.size : '14'" fontFamily="icons"></Span>
            <Span [text]="item.label ? '\n\n' : ''"></Span>
            <Span class="menu-text" [text]="item.label"></Span>
        </FormattedString>
    </Button>

result

screen shot 2017-05-01 at 11 41 03 am

In 3.0.x it results in the following

screen shot 2017-05-19 at 10 16 49 pm

tns 3.0.1
tns-ios 3.0.0
core-modules: 3.0.0 and next

Copied from original issue: NativeScript/NativeScript#4251

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions