(feature) Better style support for text on native #49736
Labels
Needs: Author Feedback
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
Needs: Version Info
Description
Compared to
View
,<Text />
has extremely limited styling capabilities. These all have issues / don't work at all:borderRadius
padding
height: 100%
width: 100%
flexGrow
flexBasis
justifyContent
alignItems
The list goes on. I wonder if this is a fundamental limitation of
NativeTextComponent
or if it could be fixed by forwarding more styles.I have spent a lot of time trying to port web code/libraries to native, and this is a massive headache, mainly because all HTML elements let you render text without any limitations.
For example, every
<span>
I turn into<Text>
results in totally incorrect styles.I'd be happy to turn this into an umbrella issue and/or assist with PRs if there is some guidance on the best approach to take.
Related from
react-strict-dom
: facebook/react-strict-dom#278Thanks!
Steps to reproduce
N/A
React Native Version
0.78.0
Affected Platforms
Runtime - iOS, Runtime - Android
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://let-me-know-if-we-need-one.com
Screenshots and Videos
Happy to provide if needed, but the styles are no-ops so I'm not sure what I'd share.
The text was updated successfully, but these errors were encountered: