Skip to content

Commit

Permalink
Merge pull request #138 from BKWLD/apply-rtl-direction-to-slides
Browse files Browse the repository at this point in the history
Re-apply RTL direction to slides
  • Loading branch information
weotch authored Jan 25, 2024
2 parents 9f73cae + 28a9ed1 commit 5b46830
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ssr-carousel-track.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,11 @@ export default
render: (create) ->
create @trackHTMLElement,
attrs: {role: "tablist" if @renderAsTablist}
class: [ 'ssr-carousel-track', { @dragging } ]
style: @styles
class: [ 'ssr-carousel-track', {
@dragging
"ssr-carousel-rtl": @rtl
}]
, @makeSlides()
</script>
Expand All @@ -199,6 +202,10 @@ export default
.ssr-carousel-slide
flex-shrink 0
// Apply direction property which was reset in .ssr-carousel
.ssr-carousel-rtl &
direction rtl
// 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']
Expand Down

0 comments on commit 5b46830

Please sign in to comment.