Skip to content

Label Text left aligned when dir=rtl #9332

Closed
@mbrevda

Description

@mbrevda

When using a RTL language, the label text seems to still be left aligned.


Expected Behavior

Label text should be right aligned when dir="rtl"

Current Behavior

Label text is always left aligned:

dir="ltr" dir="rtl"
screen shot 2017-11-29 at 4 41 34 pm screen shot 2017-11-29 at 3 03 04 pm

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

No one assigned

    Labels

    support: questionCommunity support but can be turned into an improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions