feat: Add stretch option to space between's alignItems property#4640
feat: Add stretch option to space between's alignItems property#4640timogasda wants to merge 2 commits into
stretch option to space between's alignItems property#4640Conversation
stretch option to space between's alignItens propertystretch option to space between's alignItens property
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4640 +/- ##
=======================================
Coverage 97.52% 97.52%
=======================================
Files 948 948
Lines 30363 30363
Branches 11077 11077
=======================================
Hits 29610 29610
Misses 706 706
Partials 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
stretch option to space between's alignItens propertystretch option to space between's alignItems property
| expect(container.firstChild).toHaveClass(styles[`align-${alignItems}`]); | ||
| }); | ||
|
|
||
| it('does not apply an alignment class when alignItems is undefined', () => { |
There was a problem hiding this comment.
When we don't define the alignItems props, it basically falls back to "stretched" (browser default). Should we explicitly set it to "stretch" instead of relying on the implicit browser defaults?
There was a problem hiding this comment.
I'm not sure I understand. The default value for align-items is normal, not stretch.
There was a problem hiding this comment.
Yes, which in our case behaves like stretch (https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/align-items#values). Except that I missed
behaves like start on replaced absolutely-positioned boxes
which would change the behavior on rare cases were SpaceBetween has a absolutely-positioned replaced element (e.g., img, canvas, input?) as a direct child. So I think we are good, keeping it as is to ensure we don't break some niche cases.
Description
This change adds a new option of
"stretch"to thealignItemsproperty on space between.Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.