Skip to content
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

Non-spec behavior using alignItems: center #1704

Open
1 task done
Titozzz opened this issue Sep 25, 2024 · 0 comments
Open
1 task done

Non-spec behavior using alignItems: center #1704

Titozzz opened this issue Sep 25, 2024 · 0 comments

Comments

@Titozzz
Copy link

Titozzz commented Sep 25, 2024

Report

Issues and Steps to Reproduce

Here is a playground in which we can see that setting alignItems: 'center' actually allows the content to grow bigger than it's container.

Broken playground

Expected Behavior

When setting alignItems: center, content should stay within bounds.

We made a reproduction in codepen.

ℹ️ Note: We are not sure using flexBasis is the best way to emulate a component from react-native but it seems to be okay.

⚠️ Note 2: Fun fact, when using React Native and Old yoga errata settings (classic), this bug is harder to trigger as it needs an extra to happen, see this playground. I believe this has allowed this bug to be uncommon for most yoga users (that would be using react native). If more users start using a stricter errata, it will be a much bigger issue I believe.

Actual Behavior

The content overflows

Link to Code

See playground

Let me know if there is anything else that would be needed to get this fixed. Thanks 🫡

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

No branches or pull requests

2 participants