Skip to content

fix: fix Surface styling when flex set #4634

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

Merged
merged 1 commit into from
May 7, 2025

Conversation

BogiKay
Copy link
Contributor

@BogiKay BogiKay commented Feb 19, 2025

Motivation

PR fixes the issue when flex is applied to the Surface component and flex style is re-applied only to outer component, not the nested one, so styles can be broken if e.g flex and justifyContent are applied together.

Exact repro is provided in #4632

Related issue

Fixes #4632

@BogiKay BogiKay requested a review from gedu February 19, 2025 22:09
@BogiKay BogiKay self-assigned this Feb 19, 2025
@callstack-bot
Copy link

callstack-bot commented Feb 19, 2025

Hey @BogiKay, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@dribble-njr
Copy link

dribble-njr commented Feb 21, 2025

I have a question, will the flex-related properties (or other outerLayerStyleProperties) take effect in the inner box? On andriod and web it will be applied to the only box directly.

@lukewalczak lukewalczak added this to the 5.14.1 milestone May 6, 2025
@BogiKay BogiKay force-pushed the fix/surface-styling-flex branch from be665c1 to 8e0c8e0 Compare May 7, 2025 07:09
@lukewalczak lukewalczak merged commit 3c75257 into callstack:main May 7, 2025
3 checks passed
@durandt
Copy link

durandt commented May 15, 2025

I suspect this PR may have introduced a regression for #3652

When setting {flex:1} style on Button in a flex layout, the button won't show on iOS unless a height is set on the button, or other items with a height are added to the layout.

See my comment at:
#3652 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS surface with flex style render weird.
5 participants