Skip to content

Text on Android has shadow by default #22367

Closed
@lukasgeiter

Description

@lukasgeiter

Environment

[skip envinfo]

Description

On Android, all text has a faint shadow. This is barely noticeable in most cases but becomes visible with light colored text. As an extreme example, this is "Test" in white font on white background:

image

I would expect the text to be completely invisible but instead there is a faint shadow.

Reproducible Demo

No demo

Cause

This is a regression which has been introduced by b7ba225 and is present since version 0.57.2.
The problem is that the default value for textShadowRadius is 1. I'm not sure why that is, but I think it probably should be 0 which would solve this issue.

Workaround

The workaround is to manually set the radius to 0:

<Text style={{ textShadowRadius: 0 }}>
    Test
</Text>

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