Skip to content

Commit

Permalink
Update image block save to only save align none class (#56449)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Lende <alex+github.com@lende.xyz>
  • Loading branch information
draganescu and ajlende authored Dec 6, 2023
1 parent df1e806 commit 065c4fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-library/src/image/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export default function save( { attributes } ) {
const borderProps = getBorderClassesAndStyles( attributes );

const classes = classnames( {
[ `align${ align }` ]: align,
// All other align classes are handled by block supports.
// `{ align: 'none' }` is unique to transforms for the image block.
alignnone: 'none' === align,
[ `size-${ sizeSlug }` ]: sizeSlug,
'is-resized': width || height,
'has-custom-border':
Expand Down

1 comment on commit 065c4fb

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 065c4fb.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7117608667
📝 Reported issues:

Please sign in to comment.