Skip to content

Remove certain compatibility logic for HTML and CSS props in favor of RN natively supported props#480

Open
hoangvvo wants to merge 8 commits into
facebook:mainfrom
hoangvvo:use-latest-rn-features
Open

Remove certain compatibility logic for HTML and CSS props in favor of RN natively supported props#480
hoangvvo wants to merge 8 commits into
facebook:mainfrom
hoangvvo:use-latest-rn-features

Conversation

@hoangvvo
Copy link
Copy Markdown

@hoangvvo hoangvvo commented May 15, 2026

Remove compat layer for style props natively supported by react-native:

Props Description Docs
aspectRatio string No conversion needed anymore. aspectRatio
borderBlockColor, borderBlockEndColor, borderBlockStartColor Native logical border colors are available. borderBlockColor, borderBlockEndColor, borderBlockStartColor
borderStartStartRadius, borderStartEndRadius, borderEndStartRadius, borderEndEndRadius Native logical corner radii are available. borderStartStartRadius, borderStartEndRadius, borderEndStartRadius, borderEndEndRadius
direction Mark as native support. direction
inset, insetBlock, insetBlockEnd, insetBlockStart, insetInline, insetInlineEnd, insetInlineStart Native logical inset props are available. inset, insetBlock, insetInline
marginBlock, marginBlockEnd, marginBlockStart, marginInline, marginInlineEnd, marginInlineStart Native logical margin props are available. marginBlock, marginInline
paddingBlock, paddingBlockEnd, paddingBlockStart, paddingInline, paddingInlineEnd, paddingInlineStart Native logical padding props are available. paddingBlock, paddingInline
outlineColor, outlineOffset, outlineStyle, outlineWidth The experimental version gate is no longer needed. outlineColor, outlineOffset, outlineStyle, outlineWidth
transform: skew Fix the table entry for unsupported shorthand. transform
userSelect Mark as native support. userSelect
verticalAlign Mark as Android-only native support. verticalAlign

Similarly, remove some html prop compat:

Props Description Docs
alt, crossOrigin, height, referrerPolicy, src, srcSet, width on img Image already accepts these props. alt, crossOrigin, height, referrerPolicy, src, srcSet, width
autoComplete, defaultValue, enterKeyHint, inputMode, placeholder on input / textarea TextInput already accepts these props. autoComplete, defaultValue, enterKeyHint, inputMode, placeholder
readOnly on input / textarea Use TextInput's native prop. readOnly
spellCheck on input / textarea Mark as iOS-only native support. spellCheck
role="none" Stop rewriting to presentation. none role

Among those, the outline style is the one I care about the most as it is currently incorrectly gated and breaks the styling while the rest are merely just optional clean up.

Close #467

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 15, 2026

Hi @hoangvvo!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 15, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the cla signed label May 15, 2026
@hoangvvo hoangvvo changed the title Use latest React Native supported features Remove certain compatibility logic for HTML and CSS props in favor of RN natively supported props May 15, 2026
@yaminyassin
Copy link
Copy Markdown

LFG 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outline styles aren't parsed in React Native

2 participants