-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[RFC] Add experimental flag to use flexbox gap
in Stack
#33754
Comments
Regarding the name of the prop With this change, it seems that we could have a follow-up PR to solve: #28035. I have done a quick proof of concept: https://codesandbox.io/s/vigilant-mcclintock-pivrt3?file=/demo.tsx I'm even wondering if the wrapping behavior shouldn't be the default, to benchmark with the other Stack components: https://mui-org.notion.site/Stack-component-ef1f3428178146129edd78c5d667ccac. With this change, it seems that we could have a follow-up PR to solve: #33155 & #33810. |
No object with the name |
The PR is ready for review! #36404 |
I just tried this out in the latest release. It works great and simplifies a lot of my components. Thank you so much for this new feature! |
Why not keep both |
|
Motivation
'& > :not(style) + :not(style)'
which is not a good DX when it comes to override.gap
reduces the complexity of the code because it works for bothrow
andcolumn
direction.It would fix:
API
Adding a flag
useFlexGap
to Stack to switch the implementation from margin to flexbox gap:To switch all stacks to use gap, do it via the theme:
Note: I used to think about using CSS feature query
@support
but it does not work forgap
because the property is identical to CSS Grid gap which supports in most browser already.The text was updated successfully, but these errors were encountered: