Skip to content

Commit 93066c6

Browse files
authored
fix(ui5-li-custom): correct padding for ListItemCustom (#11487)
Increase the specificity of selection mode padding rules by including [wrapping-type] in the selectors, ensuring they override the generic [wrapping-type="None"][description] padding rule. Remove unnecessary [ui5-li] and [ui5-li-custom] selectors to prevent CSS leakage and unnecessary bundling.
1 parent 5389eb2 commit 93066c6

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

packages/main/src/themes/ListItem.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@
167167
margin-top: var(--_ui5_list_item_selection_btn_margin_top);
168168
}
169169

170-
:host([ui5-li][_selection-mode="SingleStart"]) .ui5-li-root {
170+
:host([_selection-mode="SingleStart"][wrapping-type]) .ui5-li-root {
171171
padding-inline: 0 1rem;
172172
}
173173

174-
:host([ui5-li][_selection-mode="Multiple"]) .ui5-li-root {
174+
:host([_selection-mode="Multiple"][wrapping-type]) .ui5-li-root {
175175
padding-inline: 0 1rem;
176176
}
177177

178-
:host([ui5-li][_selection-mode="SingleEnd"]) .ui5-li-root {
178+
:host([_selection-mode="SingleEnd"][wrapping-type]) .ui5-li-root {
179179
padding-inline: 1rem 0;
180180
}
181181

packages/main/src/themes/ListItemCustom.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,15 @@
2929
[ui5-radio-button].ui5-li-singlesel-radiobtn {
3030
min-width: var(--_ui5_custom_list_item_rb_min_width);
3131
}
32+
33+
:host([_selection-mode="SingleStart"]) .ui5-li-root.ui5-custom-li-root {
34+
padding-inline: 0 1rem;
35+
}
36+
37+
:host([_selection-mode="Multiple"]) .ui5-li-root.ui5-custom-li-root {
38+
padding-inline: 0 1rem;
39+
}
40+
41+
:host([_selection-mode="SingleEnd"]) .ui5-li-root.ui5-custom-li-root {
42+
padding-inline: 1rem 0;
43+
}

0 commit comments

Comments
 (0)