Spacer Block: use flex-basis
to apply DEFAULT_HEIGHT
in Flex Containers
#69425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Closes #69414
Follow Up: #68819
This PR addresses the regressions introduced by #68819.
How?
Previously, the
height
property was used to apply a fallback default forspacer blocks
within flex containers likeStack
andRow
.Ref.
gutenberg/packages/block-library/src/spacer/save.js
Line 22 in d272c0a
gutenberg/packages/block-library/src/spacer/edit.js
Lines 171 to 173 in 0daa060
However, flex containers should use
flex-basis
instead ofheight
. This PR corrects the implementation and fixes the associated bug.Testing Instructions
Inserting a spacer inside a flex container
Screencasts
Inserting "Hero, overlapped book cover with links" pattern from
twenty-twenty-five theme
no-console-error.mov
Inserting spacer inside flex container (testing backward compatibility)
no-validation-errors-720p.mov