Skip to content

Conversation

chrisdavidmills
Copy link
Contributor

I am in the process of documenting the new CSS Carousels functionality on MDN (see mdn/content#38752).

I have included the examples as live examples in the guide, but I also want to link to standalone live examples and source code, as they are not as easy to follow in-page.

@chrisdavidmills chrisdavidmills requested a review from a team as a code owner March 21, 2025 16:25
@chrisdavidmills chrisdavidmills requested review from pepelsbey and removed request for a team March 21, 2025 16:25
Copy link

github-actions bot commented Jul 4, 2025

This pull request has merge conflicts that must be resolved before it can be merged.

Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Though I found an issue with viewport units and scroll bars. It’s better to avoid using 100vw at any cost, since it’s the viewport width, not the “window content apart from scrollbars” width. And the moment you have vertical scrollbars, you’ll get this:

Image

You can check this by setting your scrollbars to be visible by default, not overlay content:

Image

So I would suggest using 100% instead of 100vw. Unfortunately, with the full-width panels, it doesn’t play nicely with flexbox, so I used a grid layout instead:

display: grid;
grid-auto-flow: column;
grid-auto-columns: 100%;
gap: 4%;
Image

@chrisdavidmills
Copy link
Contributor Author

Makes sense; thanks @pepelsbey!

Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@chrisdavidmills chrisdavidmills merged commit 3f44f83 into mdn:main Aug 7, 2025
1 check passed
@chrisdavidmills chrisdavidmills deleted the css-carousel-examples branch August 7, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants