8000 Mask overlay leaves a 1px-high area over the image · Issue #611 · dominictobias/react-image-crop · GitHub
[go: up one dir, main page]

Skip to content

Mask overlay leaves a 1px-high area over the image #611

Closed

Description

@tmarcinkowski-logitech

Hi
I have a customized instance of the cropper, and changing the overlay color to white revealed an issue where the image doesn't cover the whole image, despite having 100% height, leaving a 1px-high line. The video at the bottom shows the issue.

For me, the hacky workaround was to expand it slightly, but you might want to investigate it properly.

  & .ReactCrop__crop-mask,
  & .ReactCrop__crop-mask mask > rect:first-child {
    height: 100.1%;
  }
Screen.Recording.2025-04-09.at.13.21.02.mov

Activity

  1. dominictobias commented on Apr 14, 2025

    @dominictobias
    Owner

    Thanks this is due to SVG's being rendered on the pixel while divs are rendered with precision up to 2 decimal places.

    Screen.Recording.2025-04-14.at.19.24.21.mov

    Your workaround is the only one I could find and I think a slight overflow which shouldn't be noticeable is better than an underflow 🤞

    Plz try 11.0.10, I'm just overflowing by 0.5 pixels

  2. tmarcinkowski-logitech commented on Apr 15, 2025

    @tmarcinkowski-logitech
    Author

    I confirm that the issue is not observable anymore. Thanks for the swift response!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0