Skip to content

Commit 640ed85

Browse files
ilhan007NHristov-sap
authored andcommitted
refactor(ui5-input, ui5-textarea, ui5-date-*): allow letter spacing (SAP#2762)
Allow letter spacing in the Input, TextArea, DatePicker, DateTimePicker, DateRangePicker components with common letter spacing tool that is based on three CSS properties - line-height, letter-spacing and word-spacing by setting their default values to the host and inherit them in the native input element. FIXES: SAP#2755 FIXES: SAP#2641
1 parent e86c50b commit 640ed85

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

packages/main/src/themes/DatePicker.css

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
:host(:not([hidden])) {
55
display: inline-block;
6+
line-height: normal;
7+
letter-spacing: normal;
8+
word-spacing: normal;
69
}
710

811
:host {
@@ -15,4 +18,7 @@
1518
min-width: inherit;
1619
color: inherit;
1720
background-color: inherit;
21+
line-height: inherit;
22+
letter-spacing: inherit;
23+
word-spacing: inherit;
1824
}

packages/main/src/themes/Input.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
border: 1px solid var(--sapField_BorderColor);
1717
border-radius: var(--_ui5_input_wrapper_border_radius);
1818
box-sizing: border-box;
19+
line-height: normal;
20+
letter-spacing: normal;
21+
word-spacing: normal;
1922
}
2023

2124
:host([focused]) {
@@ -53,7 +56,6 @@
5356
font-style: inherit;
5457
-webkit-appearance: none;
5558
-moz-appearance: textfield;
56-
line-height: normal;
5759
padding: var(--_ui5_input_inner_padding);
5860
box-sizing: border-box;
5961
min-width: 3rem;
@@ -63,6 +65,9 @@
6365
font-size: inherit;
6466
font-family: inherit;
6567
text-align: inherit;
68+
line-height: inherit;
69+
letter-spacing: inherit;
70+
word-spacing: inherit;
6671
}
6772

6873
[inner-input][inner-input-with-icon] {

packages/main/src/themes/TextArea.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
border-color: var(--sapField_BorderColor);
1414
border-radius: var(--_ui5_input_wrapper_border_radius);
1515
box-sizing: border-box;
16+
line-height: 1.4;
17+
letter-spacing: normal;
18+
word-spacing: normal;
1619
}
1720

1821
:host([disabled]) {
@@ -57,7 +60,6 @@
5760
height: 100%;
5861
margin: 0;
5962
padding: var(--_ui5_textarea_padding);
60-
line-height: 1.4;
6163
box-sizing: border-box;
6264
color: inherit;
6365
font-size: inherit;
@@ -72,6 +74,9 @@
7274
background-color: var(--sapField_Background);
7375
border-width: 1px;
7476
border-style: solid;
77+
line-height: inherit;
78+
letter-spacing: inherit;
79+
word-spacing: inherit;
7580
}
7681

7782
:host([growing]) .ui5-textarea-root {

0 commit comments

Comments
 (0)