Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/block-library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Footnotes: Treat unreadable `footnotes` post meta as no footnotes instead of throwing, so the block shows its placeholder rather than the block crash warning ([#81201](https://github.com/WordPress/gutenberg/pull/81201)).
- Playlist: Improve handling of declarative waveform player configuration ([#81342](https://github.com/WordPress/gutenberg/pull/81342)).
- Cover: Pass `'full'` instead of `null` as the featured image size for parallax and repeated backgrounds, so a null array offset is no longer reached on PHP 8.5 ([#81444](https://github.com/WordPress/gutenberg/pull/81444)).
- Icon: Apply only padding to the inner SVG in the editor, so margin is no longer applied twice compared to the front end ([#81292](https://github.com/WordPress/gutenberg/pull/81292)).

### Internal

Expand Down
10 changes: 9 additions & 1 deletion packages/block-library/src/icon/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@ export function Edit( { attributes, setAttributes } ) {
const isContentOnlyMode = useBlockEditingMode() === 'contentOnly';

const colorProps = useColorProps( attributes );
const spacingProps = useSpacingProps( attributes );
// Only padding is applied to the inner SVG element, matching the front
// end. The margin support is serialized to the block wrapper instead.
const spacingProps = useSpacingProps( {
style: {
spacing: {
padding: attributes.style?.spacing?.padding,
},
},
} );
const borderProps = useBorderProps( attributes );
const dimensionsProps = useDimensionsProps( attributes );

Expand Down
Loading