-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat(Flex): improve gap
and rowGap
behaviour
#4496
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Perhaps we should just set the ccs variable |
cde66f7
to
3ee5a83
Compare
3ee5a83
to
7c38973
Compare
Some notes for future discussions: Today:
Vertical mode is the place where the most confusion exists.
|
What to do when props can overlap?The issues only really affect vertical direction. So heres some examples for discussion: Today: Always makes sense
Is always strange, this is the one we should decide on
"REV" and "SET" makes sense
"PR" and "SET" makes sense
|
Margin or flex-gap?Right now the If we can answer one of those questions, then we could more easily fix the code.
|
Turns out we need to use margins like |
Just for documentation, this is the original description before revisions: ExplanationThe current behaviour of It's too many different cases and impossible to properly explain. The new "rules" are as simple as possible without loosing functionality:
There's some more cleanup that might be needed on the logic around heading child and lines between stacks, but at least it shouldn't affect the gaps. Other minor changes:
Potential for issues:Vertical layout has some changed behaviour:
|
Changes
rowGap
the same sizes asgap
by addingx-small
,xx-small
,x-large
andxx-large
gap
androwGap
to add flex-gap/spacing at the same time in vertical layout. Only use the prop set by the user. If both are set,rowGap
will be used.Minor changes
true
fromrowGap
, it will treat it the same asundefined
(results in'small'
)rowGap
is no longer affected by the use ofsize
or a heading in children items--gap
will no loner be erroneously inherited by parent<Flex>
components