You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add some example styles customised using Shadow Parts exposed by my element.
So far I failed to do that. I cannot add a style to the document itself because API viewer's shadow root blocks them. I tried to put them inside the template[data-target=host] but that break the demo completely.
How about providing a new template where a style can be provided?
<api-viewer><templatedata-element="my-element" data-target="style"><style>
my-element::part(foo) { color: red }
</style></template></api-viewer>
The text was updated successfully, but these errors were encountered:
Ah, hey. I found my way around this by putting a style tag inside template[data-target=prefix]. This works well enough so maybe just some more docs around the available template targets would nice? I found that there are a bunch that the element expects
I would like to add some example styles customised using Shadow Parts exposed by my element.
So far I failed to do that. I cannot add a style to the document itself because API viewer's shadow root blocks them. I tried to put them inside the
template[data-target=host]
but that break the demo completely.How about providing a new template where a style can be provided?
The text was updated successfully, but these errors were encountered: