Skip to content

Image: Expand on click animates incorrectly when border is defined #63567

@artemiomorales

Description

@artemiomorales

Description

Expected: When adding a border to an image, I expect Expand on Click to animate smoothly.

Actual: The animation appears broken.

First mentioned in this comment related to adding margin support to the image.

Step-by-step reproduction instructions

  1. Add an image to a post
  2. Give the image a border
  3. Enable expand on click
  4. Publish the post; click on the image and see that the animation is broken

It looks like custom aspect ratios also affect the animation in different ways (see video below).

Screenshots, screen recording, code snippet

lightbox-border-bug.mp4
lightbox-aspect-ratio-border.mp4

Environment info

  • WordPress 6.6-rc3
  • Gutenberg 18.8.0-rc.1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Design FeedbackNeeds general design feedback.[Block] ImageAffects the Image Block[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions