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

Demo: shadow parts & slots inspector #42

Open
web-padawan opened this issue May 19, 2020 · 2 comments
Open

Demo: shadow parts & slots inspector #42

web-padawan opened this issue May 19, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@web-padawan
Copy link
Collaborator

The idea is to implement a special mode (e.g. using a tab in the "Demo" part).

  • DOM flat tree representation: component, its part elements and slot elements
expansion-panel
  ::part(header)
    ::part(toggle)
    ::slotted([slot="name"])
  ::part(content)
    ::slotted(:not([slot]))
  • When hovering a row in the list, it should be highlighted in the demo snippet:

demo

  • Additionally, borders can be toggled for all the CSS parts in the component

  • Clicking every selector allows to edit corresponding CSS rules in a text area.

@web-padawan web-padawan added the enhancement New feature or request label May 19, 2020
@web-padawan web-padawan self-assigned this May 19, 2020
@jouni
Copy link

jouni commented May 20, 2020

Looks great! Have you considered state attributes?

@web-padawan
Copy link
Collaborator Author

Yes, I was thinking about state attributes too. However it would make it more complicated.

Another idea that I have on my mind is to create a "states" section showcasing all the states:

  • :hover
  • :focus
  • :focus-visible

And of course custom states as well. This would mean the need to distinguish "state attributes" (although all the attributes that do not match properties can be considered).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants