xiaokaike / vue-color

:art: Vue Color Pickers for Sketch, Photoshop, Chrome & more http://vue-color.surge.sh
https://xiaokaike.github.io/vue-color/
MIT License
2.54k stars 355 forks source link

Running inside a Web Component / Shadow DOM #229

Open mattbryson opened 3 years ago

mattbryson commented 3 years ago

I'm trying to get this to run up inside a Web Component - which I think will be fine, however I'm running into this issue: https://github.com/xiaokaike/vue-color/issues/182

Where the production dist version still injects styles into the HEAD, rather than build an external CSS file.

As its in the HEAD of the host document, those styles do not filter down inside the Web Component.

Any plans to have an external CSS file included with the production dist?

Or any ideas on how to get the styles to either be injected into a web components shadow DOM ?

Cheers

Matt

jameswragg commented 3 years ago

The instructions on vue-custom-element may help you get your styles within ShadowDOM https://github.com/karol-f/vue-custom-element#shadowdom-example