-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 component does not respect border properties #5187
Comments
This looks to be a general problem that will likely affect any non-ContentControl-based component. |
We know that Facebook has issues with some components not having borders that they expected. I'm still waiting to hear back if this is one of the ones they're waiting on. If so, we'll want to prioritize for 0.63. If not, this is still a good thing to fill in for API parity but less pressing. |
Unfortunately #5213 won't fix this. The problem here is that Text maps to TextBlock and Run, which doesn't have border properties. If we consider the full problem it gets pretty tricky because Text can be nested. In the nested case we have a Run that can wrap so the border isn't guaranteed to be a simple rectangle in that case. I suggest we prioritize fixing the simple case first, which is to handle the border properties only on the outer TextBlock. I can think of several ways to fix this:
|
The border properties should apply to all components in react-native but the RNW code only applies them to certain components:
-View
-Image
-Components based on ContentControl
Any other component, like Text, does not respect the border properties.
See: https://snack.expo.io/kJlEGti8g
On other platforms, notice the border draws around the text. For example this is what the snack looks like on Android:
On Windows it looks like this:
Oops! No border is rendered.
The text was updated successfully, but these errors were encountered: