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

Image and post featured image are missing border style control #47401

Open
carolinan opened this issue Jan 25, 2023 · 3 comments
Open

Image and post featured image are missing border style control #47401

carolinan opened this issue Jan 25, 2023 · 3 comments
Labels
[Block] Image Affects the Image Block [Block] Post Featured Image Affects the Post Featured Image Block [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Description

The image and featured image block has block support for border color, radius and width.
The missing border style control causes problems for themes that has a border style that is more specific than the CSS that is output by the block library:

html :where([style*=border-width]) {
    border-style: solid;
}

This can cause the border to not be visible.

Step-by-step reproduction instructions

Using WordPress 6.2 alpha and https://core.trac.wordpress.org/ticket/56487,
Activate Twenty Twenty or Twenty Twenty-One.

  1. Create a new post and add a featured image block.
  2. Add a border color, width and radius,
  3. Confirm that the style looks correct in the editor.
  4. Now please save and view the image on the front.
  5. Confirm that the border is not visible.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.2 Alpha

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

@carolinan carolinan added [Type] Bug An existing feature does not function as intended [Block] Image Affects the Image Block [Block] Post Featured Image Affects the Post Featured Image Block labels Jan 25, 2023
@carolinan
Copy link
Contributor Author

Before I work on this, I am trying to understand why the border style was omitted.
@aaronrobertshaw -I have read through #42847 but it is still unclear to me:
Does the placeholder border break if the border style option is added?

@aaronrobertshaw
Copy link
Contributor

aaronrobertshaw commented Jan 25, 2023

Thanks for the ping @carolinan 👍

You might find extra context and history in the PR adding border support to the Image block. The supports adopted for the Post Featured Image block were chosen so they were consistent.

I'm currently at the end of my day here and will be AFK tomorrow. I'll dig a little deeper into the history and possible options on Friday.

Edit: Here's where the decision to omit border style was initially made - #31366 (comment). Perhaps with recent advancements to the block selectors API we might be nearing a time to revisit that call.

@github-actions
Copy link

Hi,
This issue has gone 180 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Block] Post Featured Image Affects the Post Featured Image Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants