First children that have a custom link color assigned have unnecessary top blockGap margin #35353
Labels
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
As noted in #34441, the current
blockGap
rules specify a top margin for blocks that appear after the first element. it is not intended to apply to first children.This breaks when the first child has a custom link color assigned. When that's the case, Gutenberg provides some inline styles that precede the block. The browser seems to interpret this
<style>
element as the first child, and it applies the top margin to the block as if it were the second child of the parent.Step-by-step reproduction instructions
Using a theme that enables
blockGap
, try the following markup:You'll notice that the top
blockGap
margin is applied to the paragraph block, even though it's the first child bock.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: