Cannot get blockGap when skipping supports.spacing serialisation. #63163
Labels
[Feature] Block API
API that allows to express the block paradigm.
[Type] Bug
An existing feature does not function as intended
Description
If the serialisation of
supports.spacing
is skipped,getSpacingClassesAndStyles()
can be used to obtain the spacing styles.In this case,
padding
andmargins
are correctly retrieved, butblockGap
is not.Step-by-step reproduction instructions
block.json
, setsupports.spacing.__experimentalSkipSerialisation
to true.import { __experimentalGetSpacingClassesAndStyles as useSpacingProps } from '@wordpress/block-editor';
.const spacingProps = useSpacingProps( attributes );
Screenshots, screen recording, code snippet
block.json
Edit
Input attributes
Ideal
Actual
Following the code, only
padding
andmargin
were imported below.https://github.com/WordPress/gutenberg/blob/trunk/packages/style-engine/src/styles/spacing/index.ts
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: