Skip to content

Commit ef00170

Browse files
authored
fix(ui5-label): enable text truncation in IE (#136)
Additionally, remove all the nesting, preparing transition from LESS to CSS.
1 parent c4aff35 commit ef00170

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

packages/main/src/themes/base/Label.less

+26-25
Original file line numberDiff line numberDiff line change
@@ -12,49 +12,50 @@
1212

1313
:host(ui5-label) {
1414
display: inline-block;
15-
cursor: text;
1615
max-width: 100%;
16+
cursor: text;
17+
}
1718

18-
& span[data-sap-ui-wc-root] {
19-
display: flex;
20-
}
19+
:host(ui5-label) span[data-sap-ui-wc-root] {
20+
display: flex;
2121
}
2222

2323
ui5-label {
2424
display: inline-block;
25-
cursor: text;
2625
max-width: 100%;
26+
overflow: hidden;
27+
cursor: text;
28+
}
2729

28-
& span[data-sap-ui-wc-root] {
29-
display: flex;
30-
}
30+
ui5-label span[data-sap-ui-wc-root] {
31+
display: flex;
3132
}
3233

3334
.sapMLabel {
3435
display: inline-block;
35-
text-overflow: ellipsis;
36+
width: 100%;
3637
color: @sapUiContentLabelColor;
3738
font-family: @sapUiFontFamily;
3839
font-size: @sapMFontMediumSize;
3940
font-weight: normal;
41+
text-overflow: ellipsis;
4042
overflow: hidden;
41-
width: 100%;
4243
white-space: nowrap;
4344
cursor: inherit;
45+
}
4446

45-
&.sapMLabelWrapped {
46-
white-space: normal;
47-
line-height: 1.4rem;
48-
}
49-
50-
&.sapMLabelRequired:before {
51-
content:"*";
52-
color: @sapUiFieldRequiredColor;
53-
font-size: 1.25rem;
54-
font-weight: bold;
55-
position: relative;
56-
height: 100%;
57-
display: inline-flex;
58-
align-items: flex-start;
59-
}
47+
.sapMLabel.sapMLabelWrapped {
48+
white-space: normal;
49+
line-height: 1.4rem;
6050
}
51+
52+
.sapMLabel.sapMLabelRequired:before {
53+
position: relative;
54+
height: 100%;
55+
display: inline-flex;
56+
align-items: flex-start;
57+
content:"*";
58+
color: @sapUiFieldRequiredColor;
59+
font-size: 1.25rem;
60+
font-weight: bold;
61+
}

0 commit comments

Comments
 (0)