Description
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.