Skip to content

Commit

Permalink
Docs: Clarify that blockGap support depends on layout support
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Aug 2, 2023
1 parent 76faac8 commit 078df84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/how-to-guides/themes/theme-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ As a result of this change, it’s now the block author and theme author’s res

### What is blockGap and how can I use it?

For blocks that contain inner blocks, such as Group, Columns, Buttons, and Social Icons, `blockGap` controls the spacing between inner blocks. Depending on the layout of the block, the `blockGap` value will be output as either a vertical margin or a `gap` value. In the editor, the control for the `blockGap` value is called _Block spacing_, located in the Dimensions panel.
For blocks that contain inner blocks, such as Group, Columns, Buttons, and Social Icons, `blockGap` controls the spacing between inner blocks. For `blockGap` to work, the block must also opt in to the [`layout` block support](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout), which provides layout styles that can be adjusted via the block spacing controls. Depending on the layout of the block, the `blockGap` value will be output as either a vertical margin or a `gap` value. In the editor, the control for the `blockGap` value is called _Block spacing_, located in the Dimensions panel.

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/block-api/block-supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ supports: {
spacing: {
margin: true, // Enable margin UI control.
padding: true, // Enable padding UI control.
blockGap: true, // Enables block spacing UI control.
blockGap: true, // Enables block spacing UI control for blocks that also use `layout`.
}
}
```
Expand Down

0 comments on commit 078df84

Please sign in to comment.