[Help]: Question about CSS rules used #838
-
SummaryHi @davidjerleke I'm about to deploy Embla slides to prod 😃 just was curios to know the reason behind these two CSS rules, maybe you remember? I think I figured out why touch-action: pan-y; on embla__container. Thank you, If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox exampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @meirroth, Thanks for your question.
This is here to prevent slides and slide content to grow larger than their slide container. Please read about why this is necessary here.
Best, |
Beta Was this translation helpful? Give feedback.
Hi @meirroth,
Thanks for your question.
backface-visibility: hidden;
is there because sometimes some browsers struggle with rendering transforms, which Embla is using to create its scroll effect. For example it can fix unwanted flickering and/or jagged edges. Please read this StackOverflow answer to understand it better.This is here to prevent slides and slide content to grow larger than their slide container. Please read about why this is necessary here.
touch-action: pan-y;
should be applied to horizontal carousels to prevent the page …