RTL safari fix (#12963)

pull/12978/head
Yosi Levy 2022-06-21 12:03:22 +03:00 committed by GitHub
parent 048ac3965e
commit ea667cf0b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -19,6 +19,14 @@ export class HaFab extends FabBase {
direction: var(--direction); direction: var(--direction);
} }
`, `,
// safari workaround - must be explicit
document.dir === "rtl"
? css`
:host .mdc-fab--extended .mdc-fab__icon {
direction: rtl;
}
`
: css``,
]; ];
} }

View File

@ -126,6 +126,20 @@ export class HaTextField extends TextFieldBase {
direction: var(--direction); direction: var(--direction);
} }
`, `,
// safari workaround - must be explicit
document.dir === "rtl"
? css`
.mdc-text-field__affix--suffix,
.mdc-text-field--with-leading-icon,
.mdc-text-field__icon--leading,
.mdc-floating-label,
.mdc-text-field--with-leading-icon.mdc-text-field--filled
.mdc-floating-label,
.mdc-text-field__input[type="number"] {
direction: rtl;
}
`
: css``,
]; ];
} }