Skip to content

fix(ui5-li-custom): correct padding for ListItemCustom #11487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kgogov
Copy link
Member

@kgogov kgogov commented May 8, 2025

This change addresses an issue with padding styles in the ListItemCustom component, ensuring consistent and accurate layout.

Fixes: #11480

This change addresses an issue with padding styles in the ListItem
component, ensuring consistent and accurate layout.

Fixes: #11480
padding-inline: 0 1rem;
}

:host([ui5-li][_selection-mode="Multiple"]) .ui5-li-root {
:host([ui5-li][_selection-mode="Multiple"]) .ui5-li-root,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the [ui5-li] selector needed here?

Including this selector allows the parent class to be aware of its child components. However, this approach has a downside: the corresponding CSS will be bundled with all components that extend the ListItem class, even though these selectors may never match in those contexts. This seems unnecessary and potentially inefficient. Please reconsider and revise the implementation accordingly, as the current setup appears conceptually flawed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The selector is currently there to enforce stronger CSS specificity, but I agree it’s worth exploring if we can achieve the same effect with a cleaner setup. I’ll see what can be done to optimize it.

@kgogov kgogov marked this pull request as draft May 8, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ListItemStandard & ListItemCustom]: checkboxes are misaligned
2 participants