vpusher / the-grid

Grid layout custom element with drag and drop capabilities
https://www.webcomponents.org/element/vpusher/the-grid
MIT License
129 stars 31 forks source link

Apply custom style to parent instead of head #3

Closed bkjohnson closed 7 years ago

bkjohnson commented 7 years ago

This is a fix for #2

My guess is that styles in <head> aren't able to trickle down into the shadow DOM of children elements.

bkjohnson commented 7 years ago

@vpusher do you think this is a good fix?

vpusher commented 7 years ago

@bkjohnson Hey ! Thank you for your contribution. The thing is we can't rely on the parent node, we don't know its behavior, its lifecycle, how are handled its children, ... seems risky. By definition, a custom element does nos rely on the outside world.

We need to handle this in the element runtime/dom itself. Basically, in its shadow root.

vpusher commented 7 years ago

@bkjohnson see #4 if it fits your needs.

vpusher commented 7 years ago

Released in v1.0.2