Skip to content

Commit

Permalink
Merge 857bc64 into 9278daf
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-fix committed Apr 30, 2020
2 parents 9278daf + 857bc64 commit 6293d7d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
22 changes: 22 additions & 0 deletions src/vaadin-number-field.html
Expand Up @@ -42,6 +42,28 @@
/* Older Firefox versions (v47.0) requires !important */
-moz-appearance: textfield !important;
}

:host([dir="rtl"]) [part="input-field"] {
direction: ltr;
}

:host([dir="rtl"]) [part="value"]::placeholder {
direction: rtl;
}

:host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {
direction: rtl;
}

:host([dir="rtl"]) [part="value"]:-ms-input-placeholder,
:host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {
direction: rtl;
}

:host([dir="rtl"]:not([has-controls])) [part="value"]::placeholder,
:host([dir="rtl"]:not([has-controls])) [part="input-field"] ::slotted(input)::placeholder {
text-align: left;
}
</style>

<div
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions test/visual/vaadin-number-field/rtl.html
Expand Up @@ -23,6 +23,7 @@

<fieldset id="rtl">
<vaadin-number-field label="كلمه السر" placeholder="أنشئ كلمة مرور"></vaadin-number-field>
<vaadin-number-field label="كلمه السر" value="987654321987"></vaadin-number-field>
</fieldset>

</body>
6 changes: 3 additions & 3 deletions theme/lumo/vaadin-text-field-styles.html
Expand Up @@ -297,9 +297,9 @@
transform-origin: 0% 0;
}

:host([dir="rtl"]) [part="value"],
:host([dir="rtl"]) [part="input-field"] ::slotted(input),
:host([dir="rtl"]) [part="input-field"] ::slotted(textarea) {
:host([dir="rtl"]:not(vaadin-number-field):not(vaadin-big-decimal-field)) [part="value"],
:host([dir="rtl"]:not(vaadin-number-field):not(vaadin-big-decimal-field)) [part="input-field"] ::slotted(input),
:host([dir="rtl"]:not(vaadin-number-field):not(vaadin-big-decimal-field)) [part="input-field"] ::slotted(textarea) {
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
}

Expand Down

0 comments on commit 6293d7d

Please sign in to comment.