From c081cbc5cdf0f5fc73c9708c11fe354dbadd6c1a Mon Sep 17 00:00:00 2001 From: Nabil Kadimi Date: Wed, 26 Feb 2014 02:04:21 +0000 Subject: [PATCH] Automate RTL support --- css/style.css | 8 ++++++++ jquery.isotope.js | 3 +++ 2 files changed, 11 insertions(+) diff --git a/css/style.css b/css/style.css index e87f0d9..1e46830 100644 --- a/css/style.css +++ b/css/style.css @@ -38,6 +38,14 @@ transition-property: transform, opacity; } +html[dir='rtl'] .isotope .isotope-item { + -webkit-transition-property: right, top, -webkit-transform, opacity; + -moz-transition-property: right, top, -moz-transform, opacity; + -ms-transition-property: right, top, -ms-transform, opacity; + -o-transition-property: right, top, -o-transform, opacity; + transition-property: right, top, transform, opacity; +} + /**** disabling Isotope CSS3 transitions ****/ .isotope.no-transition, diff --git a/jquery.isotope.js b/jquery.isotope.js index 902973b..f2bc8d7 100644 --- a/jquery.isotope.js +++ b/jquery.isotope.js @@ -595,6 +595,9 @@ }, _positionAbs : function( x, y ) { + if ( $('html').attr('dir') === 'rtl' ) { + return { right: x, top: y }; + } return { left: x, top: y }; },