Skip to content

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

Closed

Description

@carolinan

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

Activity

  1. added
    [Type] Bug
    [Block] Image
    [Block] Post Featured Image
    on Jan 25, 2023
  2. carolinan commented on Jan 25, 2023

    @carolinan
    ContributorAuthor

    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?

  3. aaronrobertshaw commented on Jan 25, 2023

    @aaronrobertshaw
    Contributor

    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.

  4. github-actions commented on Jul 25, 2023

    @github-actions

    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.

  5. self-assigned this
    on Mar 4, 2025
  6. added
    [Type] Enhancement
    and removed
    [Type] Bug
    on Mar 4, 2025
  7. removed their assignment
    on Feb 27, 2026
  8. dhananjaykuber commented on Nov 12, 2026

    @dhananjaykuber
    Contributor

    Featured Image got border style support in #83956, so only the Image block is left here. It isn't in the remaining border work in #43241. @aaronrobertshaw, was leaving it out of Image a deliberate decision, or should it be added? If it's deliberate, this issue could be closed.

  9. added
    [Status] In Progress
    on Nov 12, 2026
  10. aaronrobertshaw commented on Nov 12, 2026

    @aaronrobertshaw
    Contributor

    Thanks for the nudge @dhananjaykuber 👍

    It wasn't meant to be permanent. Border style was only left off Image "initially" when border support was first added.

    Image now sends its border to the img, crop area and placeholder through block selectors. Featured Image had the same setup when it gained border style in #83956.

    The two image blocks should match, so I've opened #86733 to add border style to Image, building on #69401. It will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

[Block] Image[Block] Post Featured Image[Status] In Progress[Type] Enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions