Skip to content

ebay-accordion: Accordion list styles unexpectedly apply to list items that are children of the accordion #5

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

Closed
1 task done
caseycarroll opened this issue Apr 3, 2025 · 0 comments · Fixed by #12

Comments

@caseycarroll
Copy link

I verified there's no existing issue for this bug.

  • There are no existing issues

Current behavior

When a list item is a descendant of an accordion, it receives the accordion divider border style intended to exist between accordion summary elements.

Expected behavior

The visual divider for accordions should not be applied to lists rendered inside of an accordion.

Skin version

19

Device/OS/Browser info

Macbook Pro, MacOS Sonoma, Chromium, Safari, Firefox

Steps to reproduce

Using the ebay core UI accordion component like so:


<ebay-accordion>
   <@details>
       <@summary>List of cool stuff</@summary>
       <ul>
            <li>Cats</li>
            <li>Coffee</li>
      </ul>
   </@details>
</ebay-accordion>


The list items "Cats" and "Coffee" will having the following CSS rule applied:

ul.accordion li:not(:last-child) {
    border-bottom: 1px solid var(--color-stroke-subtle);
}

Relevant code block

ul.accordion li:not(:last-child) {
    border-bottom: 1px solid var(--color-stroke-subtle);
}

This could be resolved by only targeting direct descendants.

ul.accordion > li:not(:last-child) {
    border-bottom: 1px solid var(--color-stroke-subtle);
}

Additional context

Image
@github-project-automation github-project-automation bot moved this to Todo in eBayUI Apr 3, 2025
@agliga agliga added the size: 1 label Apr 3, 2025
@agliga agliga self-assigned this Apr 3, 2025
@agliga agliga transferred this issue from eBay/skin Apr 23, 2025
@agliga agliga added this to the 04-25 milestone Apr 25, 2025
@agliga agliga moved this from Todo to Pull request in eBayUI Apr 25, 2025
@github-project-automation github-project-automation bot moved this from Pull request to Done in eBayUI Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants