-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Package] Server Side Render/packages/server-side-render/packages/server-side-render[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The @wordpress/server-side-render
package's ServerSideRender
component supports a skipBlockSupportAttributes
attribute which is intended to exclude all block support generated styles from inner renders. This is useful because the block editor already adds these styles to the internal wrap within the editor context.
The majority block support generated styles work properly with the exception of shadow
(Drop Shadow) block support. This style is passed on regardless of the skipBlockSupportAttributes
attribute.
Step-by-step reproduction instructions
- Register a block with the following criteria.
- Supports "shadow" = true.
- Uses
ServerSideRender
to render the block output. - In the block renderer callback on the PHP side use
get_block_wrapper_attributes
to generate HTML attributes for the element surrounding the block.
- Add the block to a template.
- Add a Drop Shadow using the Styles section of the block.
- Notice the CSS
box-shadow
is added to both the wrap created by the editor and the element generated on the PHP side render callback.
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress version 6.6
- TwentyTwentyTwo theme
- Not browser specific.
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
Metadata
Metadata
Assignees
Labels
[Package] Server Side Render/packages/server-side-render/packages/server-side-render[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended