Replies: 8 comments
-
Just one thing to keep in mind. The image comparer currently works for any element! <sl-image-comparer>
<pdf-page slot=before of=c no=14 canvas=.js rotation=90 scale=2 onclick=this.svg--></pdf-page>
<pdf-page slot=after of=c no=14 canvas=ium rotation=90 scale=2 onclick=this.update()></pdf-page>
</sl-image-comparer> We should not lose this genericity! |
Beta Was this translation helpful? Give feedback.
-
I believe anyone can just use: <sl-image-comparer>
<img slot=before srcset=⋯>
<img slot=after srcset=⋯>
</sl-image-comparer> |
Beta Was this translation helpful? Give feedback.
-
Does that work for you? I seemed to break things when I tried. |
Beta Was this translation helpful? Give feedback.
-
@xaxam A quick test using |
Beta Was this translation helpful? Give feedback.
-
It would also help to have an |
Beta Was this translation helpful? Give feedback.
-
It looks like This might have something to do with how the carousel clones nodes. I would suggest trying @alenaksu given how it's architected, do you think this is a reasonable ask for the carousel, or would you consider it too difficult/out of scope? |
Beta Was this translation helpful? Give feedback.
-
Sorry but I'm not sure I got the problem. I tried to create a carousel with an image comparer in one of the slide and responsive images seemed to work properly. I guess I may have missed something. |
Beta Was this translation helpful? Give feedback.
-
@alenaksu if I understand correctly, OP was suggesting that It does seem like |
Beta Was this translation helpful? Give feedback.
-
What issue are you having?
I would love to use srcset in carousel
and image comparerto load images depending on the current viewport.Beta Was this translation helpful? Give feedback.
All reactions