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

Fix peeking with disabled state #102

Merged
merged 2 commits into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion demo/components/demos/misc/disabling.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<template>

<ssr-carousel
data-cy='disabling'
data-cy='disabling'
show-arrows
show-dots
loop
:peek='20'
:slides-per-page='3'
:responsive='[
{
Expand Down
2 changes: 2 additions & 0 deletions demo/content/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Note how this carousel is enabled on mobile viewports but automatically disables
<ssr-carousel
show-arrows
show-dots
loop
:peek='20'
:slides-per-page='3'
:responsive='[
{
Expand Down
5 changes: 5 additions & 0 deletions src/ssr-carousel-track.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,9 @@ export default
.ssr-carousel-slide
flex-shrink 0

// When the carousel is disabled (not enough slides to fill width), hide any
// clones that have created for other breakpoints (those with aria-hidden=true).
.ssr-carousel-mask.disabled .ssr-carousel-slide[aria-hidden='true']
display none

</style>