-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
support: questionCommunity support but can be turned into an improvement.Community support but can be turned into an improvement.
Description
When using a RTL language, the label text seems to still be left aligned.
- I have searched the issues of this repository and believe that this is not a duplicate. This is also apparently NOT related to [InputLabel] Fix transformOrigin when direction=rtl #9007 (comment). cc @alitaheri who might know more about this!
Expected Behavior
Label text should be right aligned when dir="rtl"
Current Behavior
Label text is always left aligned:
dir="ltr" |
dir="rtl" |
---|---|
![]() |
![]() |
Steps to Reproduce (for bugs)
Here is a minimal demo: https://942ywwnk4w.codesandbox.io/
Context
My labels are showing on misaligned, as per the screenshot above.
Inspecting the styles shows the text is `transform`ed to `top left` instead of `top right`
.MuiInputLabel-formControl-188 {
top: 0;
left: 0;
position: absolute;
transform: translate(0, 23px) scale(1);
}
.MuiInputLabel-root-187 {
transform-origin: top left;
}
Your Environment
Tech | Version |
---|---|
Material-UI | beta.22 |
React | 16.1 |
browser | Chrome |
Metadata
Metadata
Assignees
Labels
support: questionCommunity support but can be turned into an improvement.Community support but can be turned into an improvement.