ampproject / amp-by-example

DEPRECATED: AMP by Example has been merged into amp.dev
http://amp.dev
Apache License 2.0
753 stars 505 forks source link

Hover zoom #983

Open lswang1618 opened 6 years ago

lswang1618 commented 6 years ago

Such as in this page https://www.williams-sonoma.com/products/global-classic-7-piece-wood-block-set/?pkey=cknife-sets&isx=0.0.0

Not relevant for mobile pages, but more for canonical amp on desktop

Can be done with css :hover + sibling selectors + css background-position

kul3r4 commented 6 years ago

me and @juliantoledo tried this in hover zoom but we don't know how to track the position of the mouse pointer to move the zoomed image. @aghassemi do you know if that's possible on css or do we need amp-position-observer to support it?

aghassemi commented 6 years ago

@kul3r4 Can't think of anyway this can be possible in AMP with existing components. Would make a nice feature request though.

kul3r4 commented 6 years ago

@ericlindley-g is there anything similar to this in the roadmap already?

ericlindley-g commented 6 years ago

It's been discussed, but not on the roadmap yet as far as I know—would be great to add as feature request in the amphtml repo!

kul3r4 commented 6 years ago

Done here