Skip to content

Commit c9f86a7

Browse files
authored
fix(ui5-label): text-align works with wrap property (#2889)
1 parent d834ec6 commit c9f86a7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

packages/main/src/themes/Label.css

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@
1111
cursor: text;
1212
}
1313

14-
:host(:not([wrap])) .ui5-label-root {
14+
.ui5-label-root {
1515
width: 100%;
16+
}
17+
18+
:host(:not([wrap])) .ui5-label-root {
1619
font-weight: inherit;
1720
display: inline-block;
1821
white-space: nowrap;
1922
cursor: inherit;
2023
overflow: hidden;
2124
}
2225

23-
bdi{
24-
content: "";
26+
bdi {
27+
content: "";
2528
padding-right: 0.15625rem;
2629
}
2730

packages/main/test/pages/Label.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ <h2>Wrapping label</h2>
7171
<ui5-label style="width: 100px" id="truncated-label-2" show-colon required >Reprehenderit amet cillum tempor ex eu dolor adipisicing reprehenderit pariatur.</ui5-label>
7272
<ui5-label style="width: 100px" id="truncated-label-3" show-colon required wrap >Reprehenderit amet cillum tempor ex eu dolor adipisicing reprehenderit pariatur.</ui5-label>
7373

74+
<div>
75+
<ui5-label style="width: 500px; text-align: right;" id="wrapping-label-4" wrap>Must be right-aligned using `text-align: right` and wrap.</ui5-label>
76+
</div>
7477
</section>
75-
78+
7679
<h2>Test show-colon not forcing truncation</h2>
7780
<ui5-label id="showColon-false">Basic Label</ui5-label>
7881
<ui5-label show-colon id="showColon-true">Basic Label</ui5-label>

0 commit comments

Comments
 (0)