Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature Request: text-indent css property #9179

Copy link
Copy link
Open
@meeshkabob

Description

@meeshkabob
Issue body actions

Request:
This is a request to implement css property text-indent in nativescript.

Currently, text-indent is not implemented, such that if it's applied to a Label element, there is no impact on the styling of that element.

Demonstrated in playground: https://play.nativescript.org/?template=play-ng&id=Iq522D&v=3

Code snippet:

<StackLayout class="home-panel">
  <Label text="Example 1: This text should be indented"
    style="text-indent: 10;"
    class="h2"></Label>
  <Label textWrap="true"
    text="Example 2: This code will wrap to the next line. By applying a negative text indent and positive margin, all lines of text after the first should be indented."
    style="margin-left: 10; text-indent: -10;"
    class="h2"></Label>
</StackLayout>

Context:
This is a particular pain point when attempting to implement a hanging indent for wrapped lines of text.

A hanging indent is one in which the first line of text is not indented, while all subsequent lines of text are indented.

Imagine this is wrapping all the way to
     this next indented line

I would normally implement a hanging indent using a negative text-indent and a positive margin-left, as shown in the snippet above. However, I'm at a loss what to do in nativescript, since text-indent is not available.

If there's another way to implement a hanging indents in nativescript, that would alternatively and absolutely meet my project's needs.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.