diff --git a/packages/block-editor/src/components/color-palette/test/__snapshots__/control.js.snap b/packages/block-editor/src/components/color-palette/test/__snapshots__/control.js.snap index 172121132b243..7db5f3ee20eb6 100644 --- a/packages/block-editor/src/components/color-palette/test/__snapshots__/control.js.snap +++ b/packages/block-editor/src/components/color-palette/test/__snapshots__/control.js.snap @@ -29,15 +29,12 @@ exports[`ColorPaletteControl matches the snapshot 1`] = ` -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; + gap: calc(4px * 1); -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; } -.emotion-4>*+*:not( marquee ) { - margin-top: calc(4px * 1); -} - .emotion-4>* { min-height: 0; } @@ -64,15 +61,12 @@ exports[`ColorPaletteControl matches the snapshot 1`] = ` -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; + gap: calc(4px * 3); -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; } -.emotion-8>*+*:not( marquee ) { - margin-top: calc(4px * 3); -} - .emotion-8>* { min-height: 0; } @@ -89,16 +83,13 @@ exports[`ColorPaletteControl matches the snapshot 1`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + gap: calc(4px * 2); -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; width: 100%; } -.emotion-10>*+*:not( marquee ) { - margin-left: calc(4px * 2); -} - .emotion-10>* { min-width: 0; } diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 8a92bbc453439..6de5d62cc3507 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -10,6 +10,7 @@ ### Bug Fix - `Button`, `Icon`: Fix `iconSize` prop doesn't work with some icons ([#43821](https://github.com/WordPress/gutenberg/pull/43821)). +- `InputControl`, `NumberControl`, `UnitControl`: Fix margin when `labelPosition` is `bottom` ([#43995](https://github.com/WordPress/gutenberg/pull/43995)). - `Popover`: enable auto-updating every animation frame ([#43617](https://github.com/WordPress/gutenberg/pull/43617)). - `Popover`: improve the component's performance and reactivity to prop changes by reworking its internals ([#43335](https://github.com/WordPress/gutenberg/pull/43335)). - `NavigatorScreen`: updated to satisfy `react/exhaustive-deps` eslint rule ([#43876](https://github.com/WordPress/gutenberg/pull/43876)) @@ -20,6 +21,7 @@ - `ToggleControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43717](https://github.com/WordPress/gutenberg/pull/43717)). - `CheckboxControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43720](https://github.com/WordPress/gutenberg/pull/43720)). - `TextControl`, `TextareaControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43782](https://github.com/WordPress/gutenberg/pull/43782)). +- `Flex`: Remove margin-based polyfill implementation of flex `gap` ([#43995](https://github.com/WordPress/gutenberg/pull/43995)). - `RangeControl`: Tweak dark gray marking color to be consistent with the grays in `@wordpress/base-styles` ([#43773](https://github.com/WordPress/gutenberg/pull/43773)). - `UnitControl`: Tweak unit dropdown color to be consistent with the grays in `@wordpress/base-styles` ([#43773](https://github.com/WordPress/gutenberg/pull/43773)). - `SearchControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43871](https://github.com/WordPress/gutenberg/pull/43871)). diff --git a/packages/components/src/base-field/test/__snapshots__/index.js.snap b/packages/components/src/base-field/test/__snapshots__/index.js.snap index bf844bf643de6..f35321afdb055 100644 --- a/packages/components/src/base-field/test/__snapshots__/index.js.snap +++ b/packages/components/src/base-field/test/__snapshots__/index.js.snap @@ -25,7 +25,7 @@ Snapshot Diff: - Received styles + Base styles -@@ -14,18 +14,17 @@ +@@ -14,19 +14,18 @@ "background": "#fff", "border": "1px solid", "border-color": "#757575", @@ -36,6 +36,7 @@ Snapshot Diff: "flex": "1", "flex-direction": "row", "font-size": "13px", + "gap": "calc(4px * 2)", "justify-content": "space-between", "outline": "none", "padding": "0 8px", @@ -80,6 +81,7 @@ exports[`base field should render correctly 1`] = ` -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; + gap: calc(4px * 2); -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; @@ -105,10 +107,6 @@ exports[`base field should render correctly 1`] = ` width: 100%; } -.emotion-0>*+*:not( marquee ) { - margin-left: calc(4px * 2); -} - .emotion-0>* { min-width: 0; } diff --git a/packages/components/src/card/test/__snapshots__/index.tsx.snap b/packages/components/src/card/test/__snapshots__/index.tsx.snap index c7329fb8c111d..2325e13746aa9 100644 --- a/packages/components/src/card/test/__snapshots__/index.tsx.snap +++ b/packages/components/src/card/test/__snapshots__/index.tsx.snap @@ -42,8 +42,8 @@ Snapshot Diff: @@ -1,8 +1,8 @@