Skip to content

[css-scroll-snap] Snapping to center of zoomed image in gallery #3583

@CharlesBelov

Description

@CharlesBelov

Re: Motivating Examples

How does the spec or site code handle situations for the following use case in the event of zoomed images in a photo gallery?

Steps:

  1. Site visitor scrolls through the gallery to a particular image.

  2. Browser snaps image to center point as a result of the CSS in the example.

  3. Site visitor pinch-zooms to expand the image such that the image is now much larger than the viewport or provided visible area. I suspect this particular concern is more properly directed at a different spec in its own separate issue, but am mentioning it in order to be rigorous.

Expected behavior: Zoomed image stays zoomed.

Feared behavior: Zoomed image snaps back to original size at the center point.

  1. Visitor attempts to pan around the enlarged image in order to see all of the image contents. This is the primary focus of concern for this issue.

Expected behavior: Visitor can pan around the image freely with no further snapping taking place.

Feared behavior: Any time the visitor pans toward the edge of the image, the browser snaps the image back to center point and/or resets the zoom.

  1. The site visitor inadvertently overshoots the edge of the image. This is related to the previous step. Please advise if this needs to be a separate issue.

Desirable behavior:
The image snaps back to the nearest non-overshooting point.
or
The image remains overshot where the visitor left it.

Feared behavior: Any time the visitor inadvertently overshoots the edge of the image, the browser snaps the image back to center point, resets the zoom, or snaps to the center point of the next or previous image.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions