Nativescript: Background color applied twice in labels with `<span>`s

Created on 20 Jun 2019  路  1Comment  路  Source: NativeScript/NativeScript

Environment
Irrelevant. Occurs both on Android and iOS. Replicable in the playground.

Describe the bug
When applying a background to a label with a formatted string, the background is re-applied in the inner <span>s. This is a problem when we have a semi-transparent background, as you can see here:

span background bug

To Reproduce
Run the sample here: https://play.nativescript.org/?template=play-vue&id=x0j7SP

Expected behavior
The background should only be applied to the label, and not in the inner span again.

Sample project
https://play.nativescript.org/?template=play-vue&id=x0j7SP&v=2

Additional context


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

bug css

Most helpful comment

BTW, there is an easy workaround: set the background color of the span to transparent:

<Label textWrap="true" class="h2 description-label">
  <FormattedString>
    <Span text="Play with NativeScript!" backgroundColor="transparent"></Span>
   </FormattedString>
 </Label>

>All comments

BTW, there is an easy workaround: set the background color of the span to transparent:

<Label textWrap="true" class="h2 description-label">
  <FormattedString>
    <Span text="Play with NativeScript!" backgroundColor="transparent"></Span>
   </FormattedString>
 </Label>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

guillaume-roy picture guillaume-roy  路  3Comments

valentinstoychev picture valentinstoychev  路  3Comments

NickIliev picture NickIliev  路  3Comments

OscarLopezArnaiz picture OscarLopezArnaiz  路  3Comments

Pourya8366 picture Pourya8366  路  3Comments