-
Notifications
You must be signed in to change notification settings - Fork 311
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
app-grid class is not applied to distributed nodes #410
Comments
Just merged #396 which addresses this issue. Thanks! |
The merged solution uses a different approach. Clients are expected to add a container with class="app-grid": <my-element>
<div slot="header">add to header</div>
<div slot="grid-content">
<div class="app-grid">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
</div>
</my-element> I wanted to suggest: <my-element>
<div slot="header">add to header</div>
<div slot="gird-content">
<div>1</div>
<div class="wide-tile">2</div>
<div>3</div>
</div>
</my-element> Is the former approach preferable? If so, why? Currently the demo I prepared works in ShadyDOM, but not in ShadowDOM. |
There are a few limitations in the custom property shim so I don't think we can support what you originally suggested. The current API (of app-grid) tries to work around those limitations ;) |
Thank you for the explanation. I think it is worth documenting though. |
A follow up question. Under Shadow DOM v1 it is no longer possible to target a descendant in the slotted subtree (only top-level elements). The accepted solution: <x-foo>
<ul class="app-grid">
<li class="expand-me">item</li>
</ul>
</x-foo> will not work - there is no way of applying any styles to any of the descendants of |
Correct. In Shadow DOM v1, |
Description
app-grid class is not applied to distributed nodes
Expected outcome
Distributed nodes can be styled by app-grid.
Actual outcome
Distributed nodes are not styled.
Live Demo
https://jsbin.com/fuxekesune/edit?html,output
The text was updated successfully, but these errors were encountered: