Skip to content

Commit

Permalink
Re-apply RTL direction to slides
Browse files Browse the repository at this point in the history
  • Loading branch information
weotch committed Jan 25, 2024
1 parent 9f73cae commit 28a9ed1
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 28a9ed1

Please sign in to comment.