-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LinearProgress and Switch should not be flipped in right-to-left themes #28326
Comments
Does the issue still persist in v5? If so, please create a reproduction that we can look into. |
unfortunately,yes |
So these components shouldn't be flipped in a right-to-left theme? |
yes, exactly |
I'm getting some mixed signals here. Reading the Material Design guidelines, the LinearProgress should be mirrored:
-- https://material.io/design/usability/bidirectionality.html#mirroring-layout unless LinearProgress is used for media progress:
-- https://material.io/design/usability/bidirectionality.html#mirroring-elements I couldn't find anything about the Switch. It seems like there's some more in-depth research required that goes beyond "our design is that way". |
It seems that the right direction depends on the context, and so that it should be configurable with a prop.
|
|
Hey folks, has this issue been claimed? Would love to work on it |
yes this is what we want in material rtl, |
It would be nice to specify this at component level. I also naively tried the following: <LinearProgress variant="determinate" value={67} sx={{
direction: "rtl",
}}/> Since this is a custom component the otherwise valid CSS has no meaning to component's children. If you're okay with a hack, LinearProgress could read direction from sx and use that value to overwrite direction read from useTheme. |
RTL does not work correctly in progress bar and switch btns with styleProvider
hi
i use styleProvider for making rtl based on docs and everything works correct but linear progress bar and switch component are completely wrong and they are fliped
here is sandBox:
https://codesandbox.io/s/material-demo-forked-08r6g?file=/index.js
i would like switch button off state goes to left and progress bar start from left side
The text was updated successfully, but these errors were encountered: