Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]: Make a mention of size of slider is not equal to the size of the element in Carousel #6436

Open
2 tasks done
MrOxMasTer opened this issue Jan 23, 2025 · 0 comments
Open
2 tasks done

Comments

@MrOxMasTer
Copy link

MrOxMasTer commented Jan 23, 2025

Feature description

It may be obvious to some that if you use pl-[value], you need to factor that indentation into the slider size as well, i.e. item size + indentation = slider size. Because basically inside the CarouselItem element is some other element, like a product card etc.
But it's just not always obvious. Because of different settings, for example containScroll, align, sometimes it is not clear where and how something should be placed. It makes my head swell if I try to combine it with classes like container from tailwindcss.
For example, I don't know embla-carousel and it's the first time I use it in shadcnui, so this strange behavior was a discovery for me.

Image

--slide-size not equal element size inside the slide.

Affected component/components

https://codesandbox.io/p/sandbox/embla-carousel-default-react-forked-snjtld

Additional Context

Additional details here...

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant