Skip to content

Commit 2d144d4

Browse files
committed
fix(ui5-li): improve CSS overstyling for list items
1 parent 10b85b8 commit 2d144d4

File tree

4 files changed

+16
-30
lines changed

4 files changed

+16
-30
lines changed

packages/main/src/ExpandableText.ts

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import ExpandableTextCss from "./generated/themes/ExpandableText.css.js";
5050
* @extends UI5Element
5151
* @public
5252
* @since 2.6.0
53-
* @csspart text - Used to style the text content of the component
5453
*/
5554
@customElement({
5655
tag: "ui5-expandable-text",

packages/main/src/ExpandableTextTemplate.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export default function ExpandableTextTemplate(this: ExpandableText) {
99
<div>
1010
<Text
1111
class="ui5-exp-text-text"
12-
part="text"
1312
emptyIndicatorMode={this.emptyIndicatorMode}
1413
>
1514
{this._displayedText}

packages/main/src/ListItemStandardTemplate.tsx

+16-20
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,14 @@ function listItemContent(this: ListItemStandard) {
3434
function renderTitle(this: ListItemStandard) {
3535
if (this.wrappingType === WrappingType.Normal) {
3636
return (
37-
<span part="title" class="ui5-li-title">
38-
<ExpandableText
39-
class={{
40-
"ui5-li-title-exp-text": true
41-
}}
42-
text={this._textContent}
43-
maxCharacters={this._maxCharacters}
44-
exportparts="text:title">
45-
</ExpandableText>
46-
</span>
37+
<ExpandableText
38+
part="title"
39+
class={{
40+
"ui5-li-title": true,
41+
}}
42+
text={this._textContent}
43+
maxCharacters={this._maxCharacters}>
44+
</ExpandableText>
4745
);
4846
}
4947

@@ -62,16 +60,14 @@ function renderDescription(this: ListItemStandard) {
6260
if (this.wrappingType === WrappingType.Normal) {
6361
return (
6462
<div class="ui5-li-description-info-wrapper">
65-
<span part="description" class="ui5-li-desc">
66-
<ExpandableText
67-
class={{
68-
"ui5-li-desc-exp-text": true
69-
}}
70-
text={this.description}
71-
maxCharacters={this._maxCharacters}
72-
exportparts="text:description">
73-
</ExpandableText>
74-
</span>
63+
<ExpandableText
64+
part="description"
65+
class={{
66+
"ui5-li-desc": true,
67+
}}
68+
text={this.description}
69+
maxCharacters={this._maxCharacters}>
70+
</ExpandableText>
7571
{renderAdditionalText.call(this)}
7672
</div>
7773
);

packages/main/src/themes/ListItem.css

-8
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,6 @@
233233
white-space: normal;
234234
}
235235

236-
:host([wrapping-type="Normal"]) .ui5-li-title .ui5-li-title-exp-text {
237-
font-size: var(--_ui5_list_item_title_size);
238-
}
239-
240-
:host([wrapping-type="Normal"]) .ui5-li-desc .ui5-li-desc-exp-text {
241-
color: var(--sapContent_LabelColor);
242-
}
243-
244236
:host([wrapping-type="Normal"]) .ui5-li-multisel-cb,
245237
:host([wrapping-type="Normal"]) .ui5-li-singlesel-radiobtn {
246238
display: flex;

0 commit comments

Comments
 (0)