From 078df84be75817acb8bac815fa7e9ceb7b25cde3 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:26:51 +1000 Subject: [PATCH] Docs: Clarify that blockGap support depends on layout support --- docs/how-to-guides/themes/theme-json.md | 2 +- docs/reference-guides/block-api/block-supports.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/how-to-guides/themes/theme-json.md b/docs/how-to-guides/themes/theme-json.md index 697592adf3236c..418e076fa839a7 100644 --- a/docs/how-to-guides/themes/theme-json.md +++ b/docs/how-to-guides/themes/theme-json.md @@ -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 { diff --git a/docs/reference-guides/block-api/block-supports.md b/docs/reference-guides/block-api/block-supports.md index 0995f4d86cfd76..a888ea6caf0c0f 100644 --- a/docs/reference-guides/block-api/block-supports.md +++ b/docs/reference-guides/block-api/block-supports.md @@ -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`. } } ```