airbnb / rheostat

Rheostat is a www, mobile, and accessible slider component built with React
MIT License
1.69k stars 189 forks source link

[RTL - Demo] hard code the leadingDirection #290

Open a15n opened 1 year ago

a15n commented 1 year ago

RTL support isn't working if you follow the Live Playground storybook steps and click around in the RTL Stories.

Rheostat RTL example

This PR manually changes the left to right when the CSS is calculated in JS, but it cannot change the left to right in the R-W-S CSS.

The root cause of this existing RTL issue is that the left to right CSS styles are not being auto-flipped, which this introductory PR's comment suggests was working correctly at some point. There have been multiple RTL PRs made and I suspect RTL was working at those times, but it is no longer working. I don't think we should merge this PR, but it is highlighting that the left/right auto-flipping is not happening as expected.