Fix nested cover block bug#28114
Conversation
scruffian
left a comment
There was a problem hiding this comment.
You might want to also get a review from @jasmussen or @kjellr.
|
The rule was added here: https://github.com/WordPress/gutenberg/pull/17143/files#diff-9e449d4b8bd69c9771de8e20c9a1d78798a6934f99e3bfc432df6ceb23def7f4R8 — maybe a quick sanity check from @senadir? |
|
I can't really remember why I introduced that (it was a long time ago), my best guess was to ensure compatibility with the resizableBox component |
|
Seems like there are a lot of benefits to trying it. Let's keep an eye out for any bugs that might ensue. |
|
There is a failing e2e test that may be related: I will try looking into this. |
|
If the test turns particularly gnarly, you can try |
|
Noting that this seems to have caused #28242. Tentative fix by @jasmussen here: #28287. (Thanks Joen!) |
|
I had to restore the An interim fix, adding If you can provide some demo content that produces the issue you see with a cover block inside a column, I'd be happy to try and look for an alternate fix. |
|
Thanks @jasmussen. This is the post content that causes the issue: You'll need a Jetpack site to test it on. There are more details here: Automattic/themes#2976 |
This PR removes
height: 100%from the default styles of the cover block.I'm not certain, but I think this line causes more issues than the uses cases that make it worth keeping. In particular it causes a bug when a cover block appears inside of a flex container (like a columns block), causing the height the cover to take up 100% of a container which may contain other blocks — pushing those blocks outside of the document flow:
Another example of this bug: Automattic/themes#2976 (comment)
How to test