diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 35cecf6a27e66..380ee35909ac8 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -51,7 +51,7 @@ Prompt visitors to take action with a button-style link. ([Source](https://githu - **Name:** core/button - **Category:** design - **Parent:** core/buttons -- **Supports:** anchor, color (background, gradients, text), interactivity (clientNavigation), shadow, spacing (padding), typography (fontSize, lineHeight), ~~alignWide~~, ~~align~~, ~~reusable~~ +- **Supports:** anchor, color (background, gradients, text), interactivity (clientNavigation), shadow (), spacing (padding), typography (fontSize, lineHeight), ~~alignWide~~, ~~align~~, ~~reusable~~ - **Attributes:** backgroundColor, gradient, linkTarget, placeholder, rel, tagName, text, textAlign, textColor, title, type, url, width ## Buttons diff --git a/packages/block-editor/src/hooks/style.js b/packages/block-editor/src/hooks/style.js index 52fd990a3cac4..42fe431a40b24 100644 --- a/packages/block-editor/src/hooks/style.js +++ b/packages/block-editor/src/hooks/style.js @@ -116,7 +116,9 @@ const skipSerializationPathsEdit = { [ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ SPACING_SUPPORT_KEY, ], - [ `${ SHADOW_SUPPORT_KEY }` ]: [ SHADOW_SUPPORT_KEY ], + [ `${ SHADOW_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ + SHADOW_SUPPORT_KEY, + ], }; /** diff --git a/packages/block-library/src/button/block.json b/packages/block-library/src/button/block.json index aa5d81c65bad3..c3d51c61a0999 100644 --- a/packages/block-library/src/button/block.json +++ b/packages/block-library/src/button/block.json @@ -98,7 +98,9 @@ } }, "reusable": false, - "shadow": true, + "shadow": { + "__experimentalSkipSerialization": true + }, "spacing": { "__experimentalSkipSerialization": true, "padding": [ "horizontal", "vertical" ], diff --git a/schemas/json/block.json b/schemas/json/block.json index 5d0c7b5281b33..9c1e89b8a601a 100644 --- a/schemas/json/block.json +++ b/schemas/json/block.json @@ -556,9 +556,15 @@ } }, "shadow": { - "type": "boolean", "description": "Allow blocks to define a box shadow.", - "default": false + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object" + } + ] }, "typography": { "type": "object",