Slick: ltr-rtl problem

Created on 2 Apr 2015  路  6Comments  路  Source: kenwheeler/slick

If slick element is defined as ltr in an element that is dir="ltr" but the page body is dir="rtl" the order of the slides is reversed. Also afterchange and beforechange events give the wrong current slide number.
see this:
http://jsfiddle.net/9f1mj8b4/

if this is forced, the problem is solved for this specific case:
.slick-slide {
float: left!important;
}

problem might be in slick.css, here:
[dir='rtl'] .slick-slide
{
float: right;
}

Investigating A11Y

Most helpful comment

+1

All 6 comments

+1

Still the same problem exists..

This problem still exists.

This problem still exists((

+1

Whose genius idea was it to use the ltr/rtl language/locale setting of my webpage as the attribute that controls the slider direction?
So much for scalability...

I have an rtl language page.
This is completely unrelated to the direction I want my slider to go.
I have text labels (rtl) inside my gallery elements. Yet I need my slider to progress left-to-right.
Trying to set this to work rtl:false leads to some really wacky behaviour.

Also this:
[dir='rtl'] .slick-slide
{
float: right;
}

I've yet to work out ANY combination of direction styles that
a. slides left-to-right on my ltr page
and
b. actually starts at the first slide (instead of the last)

Was this page helpful?
0 / 5 - 0 ratings