Skip to content

Commit

Permalink
fix(ui5-label): text-align works with wrap property (#2889)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgimkv committed Mar 2, 2021
1 parent d834ec6 commit c9f86a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions packages/main/src/themes/Label.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@
cursor: text;
}

:host(:not([wrap])) .ui5-label-root {
.ui5-label-root {
width: 100%;
}

:host(:not([wrap])) .ui5-label-root {
font-weight: inherit;
display: inline-block;
white-space: nowrap;
cursor: inherit;
overflow: hidden;
}

bdi{
content: "";
bdi {
content: "";
padding-right: 0.15625rem;
}

Expand Down
5 changes: 4 additions & 1 deletion packages/main/test/pages/Label.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ <h2>Wrapping label</h2>
<ui5-label style="width: 100px" id="truncated-label-2" show-colon required >Reprehenderit amet cillum tempor ex eu dolor adipisicing reprehenderit pariatur.</ui5-label>
<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>

<div>
<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>
</div>
</section>

<h2>Test show-colon not forcing truncation</h2>
<ui5-label id="showColon-false">Basic Label</ui5-label>
<ui5-label show-colon id="showColon-true">Basic Label</ui5-label>
Expand Down

0 comments on commit c9f86a7

Please sign in to comment.