Enhance block spacing gap config to also target the first block in a container #34441
Labels
[Status] In Progress
Tracking issues with work in progress
[Type] Code Quality
Issues or PRs that relate to code quality
[Type] Enhancement
A suggestion for improvement.
[Type] Task
Issues or PRs that have been broken down into an individual action to take
#33812 added a
blockGap
property to theme.json which enabled spacing blocks inside a container using a simpler set of rules:In effect this simplifies margins to be between blocks rather than both before and after, simplifying first-child/last-child rules and margin collapsing.
However at the moment, the rule only targets n+1 blocks:
A fix would be to also output the following rule:
That would ensure there are no default margins interfering with the first block in a stack.
The text was updated successfully, but these errors were encountered: