react / react/react-strict-dom

(feature) Better style support for text on native

Open
#278 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug: react-native
Dominant language
JavaScript
Stars
3.6k
Forks
206
PR merge metrics
No merged PRs in 30d

Description

Since <span /> maps to <Text />, it has extremely limited styling capabilities. This issue might belong in core rather than react-strict-dom, but I noticed that, among many others, these styles don't work properly on <span /> (and thus <Text />):

  • 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 upstream. Given the goal to bring web → native styling, I thought it was appropriate to post here.

I'd be happy to create an umbrella issue and/or assist with PRs if there is some guidance on the best approach to take.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the NativeTextComponent behavior and the span-to-Text mapping described in the issue. Check how the listed styles behave on native text and determine whether the limitation belongs in react-strict-dom or upstream. Done should be a clearly scoped fix or an agreed upstream issue with guidance for the affected styles.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.