-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Border radius is not applied to overlay element #44262
Comments
This seems similar to this other issue - Post Featured Image: Border radius option not working when custom height and width set |
The Cover block hasn't officially adopted border support to my knowledge. It has been in the works (#41153) but there have been some issues around how it functions in the editor which meant progress stalled while we focused on other areas. I'm not sure what the official recommendations are around attempting to style via theme.json when the block hasn't fully adopted a particular block support. I imagine it's a case of buyer beware? That said, I'll bring #41153 back up-to-date in the next couple of days and see if recent work has addressed the block popover positioning issues that were holding it back. |
I am still able to reproduce the issue on latest trunk. #44276 would potentially fix the issue along with one more issue with the overlay. I will do some testing and will mark it ready for review. For the cover block, I agree with @aaronrobertshaw above, the block doesn't officially support the border controls, yet. |
I can also replicate the issue for the post featured image block. I'll have a fix up for review in a few minutes. It appears we just need the |
I've put up a PR to fix the issue for the Post Featured Image block in: #44286. Feel free to give it a review! |
Not related to this ticket, but #44276 fixes an issue with the featured image overlay's border colors. @aaronrobertshaw @mikachan Would be great if you could help me with a review! If it looks good, maybe it can be cherry-picked with the above PR for this issue. |
I would also apreciate if Cover block will have the ability to have hover effects as well.. |
@RahiDroid I missed your ping until now, sorry. While doing some extra testing yesterday I realised there were some problems with general implementation of the Post Featured Image block's overlays when it came to borders. I've only just pushed the fixes I had to #44286. My PR linked above also addresses some discrepancies in the rendered markup between the editor and frontend. I'll comment on #44276 as I think it might be worth closing that one if that's ok with you? |
@aaronrobertshaw, I have shared my thoughts on your PR; looks great! 🎉
I believe the rendering of the overlay in the editor when opacity is 0 was the only issue. Though it doesn't affect the functionality, I agree it should definitely be removed for consistency in markup.
Sure, please go ahead. Also, add the Backport label on your PR to ensure it gets backported if we happen to push in any more code with the WP release. |
Description
If the Post Featured Image or Cover block has a border-radius set in theme.json, and the block has an overlay set, the border-radius is not applied to the overlay element.
With the Post Featured image block, the overlay shows with square corners on top of the border-radius:
For the featured image, I think we should apply the border-radius to the overlay, as well as the image.
With the Cover block, the border-radius does not appear at all (it's applied to the container element):
For the cover block, it looks like the border-radius needs to be applied to the nested image and the overlay.
This issue was found when testing the Canary style variation in Twenty Twenty-Three.
Step-by-step reproduction instructions
styles.blocks
:To test the featured image, use the following markup in place of the cover block in the single template:
The border-radius for the featured image is already set in canary.json, under
core/post-featured-image
. Notice how this is not applied correctly.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: