Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text shadow doesn't render when blur is set but offset is (0,0) #17277

Closed
Firehed opened this issue Dec 19, 2017 · 2 comments
Closed

Text shadow doesn't render when blur is set but offset is (0,0) #17277

Firehed opened this issue Dec 19, 2017 · 2 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Firehed
Copy link

Firehed commented Dec 19, 2017

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.1
Node: 8.9.0
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.0.1 Build version 9A1004
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: ^0.49.3 => 0.49.5

Steps to Reproduce

<Text style={{
    textShadowOffset: { height: 0, width: 0 },
    textShadowColor: 'red',
    textShadowRadius: 3,
}}>This text should have a shadow</Text>

Expected Behavior

Text should have a blurred shadow with no offset, similar to having text-shadow: 0 0 3px red in CSS.

Actual Behavior

No shadow exists at all

Reproducible Demo

https://snack.expo.io/B1X1Lzvff

Other

At least on iOS, I think the issue is an overly-grabby conditional in Libraries/Text/RCTShadowText.m, something like if (!CGSizeEqualToSize(_textShadowOffset, CGSizeZero) || _textShadowRadius != 0.0) {. Not too sure about the build process so I can't easily test that fix locally. Plus it seems to occur on Android as well.

@stale
Copy link

stale bot commented Feb 17, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 17, 2018
@stale stale bot closed this as completed Feb 24, 2018
@mcmar
Copy link

mcmar commented May 8, 2018

@shergin @mdvacca @davidaurelio Can one of you please re-open this or otherwise respond? I can confirm the issue and it does not appear to be intended behavior. Compare to text-shadow prop on web browsers, where the following is perfectly valid and displays the intended behavior:
text-shadow: 0 0 2px #FF0000;

@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants