AdvancedCustomFields / AdvancedCustomFields/acf
Setting blockGap in block.json doesn't render the actual spacing
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Issue
When setting blockGap to true it doesn't seem to do anything in the front-end for ACF custom blocks.
The gap does not seem to change or do anything.
block.json configuration:
...
"supports": {
"spacing": {
"padding": true,
"margin": true,
"blockGap": true
},
}
...
Expected behavior
A CSS style should be added to the block when you change the blockGap.
Below is an example when blockGap is being used on a native block.
This is the style that gets added to the block:
.editor-styles-wrapper .wp-container-11.wp-container-11 {
gap: var(--wp--preset--spacing--40);
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing an ACF custom block using the shown block.json spacing supports and compare its front-end output with the native block example. Trace how blockGap is converted into a CSS style, then verify that changing blockGap produces a gap style on the rendered block.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100