Skip to content
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

Style parts of <sl-popup> within <sl-dropdown> (exportparts) #2076

Open
devopvoid opened this issue Jun 18, 2024 · 1 comment
Open

Style parts of <sl-popup> within <sl-dropdown> (exportparts) #2076

devopvoid opened this issue Jun 18, 2024 · 1 comment
Labels
bug Things that aren't working right in the library. good first issue This bug or task is a good first issue for new contributors. help wanted Ready for a contributor to tackle.

Comments

@devopvoid
Copy link
Contributor

Describe the bug

Referring to the issue #858, which has been partially fixed, for <sl-popup> only. It is not currently possible to style the popup part inside a <sl-dropdown>, as this introduces a new level of #shadow-root.

The tooltip component is exporting the popup and arrow names, which allows you to select and style them in nested shadow trees.

It would be helpful if exportparts were introduced for the dropdown as well.

<sl-dropdown>
  #shadow-root
    <sl-popup part="base" exportparts="popup:base__popup, arrow:base__arrow">
      #shadow-root
        ...
        <div part="popup" ... >
        ...
@devopvoid devopvoid added the bug Things that aren't working right in the library. label Jun 18, 2024
@claviska claviska added help wanted Ready for a contributor to tackle. good first issue This bug or task is a good first issue for new contributors. labels Jun 18, 2024
@claviska
Copy link
Member

This seems like a fair request.

If anyone wants to take a stab at it, you'll need to export the respective parts and update the docs with @csspart attributes. (Tooltip is a good reference for how to approach it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library. good first issue This bug or task is a good first issue for new contributors. help wanted Ready for a contributor to tackle.
Projects
None yet
Development

No branches or pull requests

2 participants