Skip to content
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

Add Box Shadow support for featured image #59067

Closed
bph opened this issue Feb 15, 2024 · 4 comments · Fixed by #59616
Closed

Add Box Shadow support for featured image #59067

bph opened this issue Feb 15, 2024 · 4 comments · Fixed by #59616
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Type] Enhancement A suggestion for improvement.

Comments

@bph
Copy link
Contributor

bph commented Feb 15, 2024

What problem does this address?

In templates, features image are a major design element for Archive pages, and it would be expanded the design tools considerably if the box shadow support that is now available for the image block could also be provided for the featured image block.

What is your proposed solution?

Open up box shadow support to featured image (among other blocks)

@bph bph added [Type] Enhancement A suggestion for improvement. [Block] Post Featured Image Affects the Post Featured Image Block labels Feb 15, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Mar 5, 2024
@colinduwe
Copy link
Contributor

@bph I submitted a PR for this. Please have a look.

@bph
Copy link
Contributor Author

bph commented Mar 14, 2024

@colinduwe Did you get a chance to go over @aaronrobertshaw comments on the PR?

@colinduwe
Copy link
Contributor

@bph and @aaronrobertshaw I did look at the comments which led me down the path of trying to make a PR just for the https://github.com/WordPress/gutenberg/blob/trunk/lib/block-supports/shadow.php file so if a block adds __experimentalSkipSerialization the styles are not output on the block wrapper element. But then I started testing with the core/column block and adding __experimentalSkipSerialization works as expected without the PR. I'm still trying to understand what's different between core/column and core/post-featured-image.

@aaronrobertshaw
Copy link
Contributor

I'm still trying to understand what's different between core/column and core/post-featured-image.

The difference you encountered is that the core/column block is a static block while the core/post-featured-image block is dynamic.

The issue with skipping serialization is specific to dynamic blocks and is why it is limited to the PHP hook that applies the shadow support.

@bph bph removed the [Status] In Progress Tracking issues with work in progress label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants