Skip to content

Commit

Permalink
Merge pull request #102 from BKWLD/fix-peeking-with-disabled-state
Browse files Browse the repository at this point in the history
Fix peeking with disabled state
  • Loading branch information
weotch authored Sep 28, 2022
2 parents 66a84e8 + dbdff2c commit f86395a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
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>

0 comments on commit f86395a

Please sign in to comment.