Open hamed-musallam opened 2 years ago
This is intended and a side-effect from how react-colorful
distributes the CSS by injecting it directly into the head of the document:
This just won't work with shadow DOM.
CodeSandbox for the issue: HexColorPicker
with shadowroot .
I fixed it by injecting the styles as global styles and I got it from here: https://github.com/omgovich/react-colorful/blob/master/src/css/styles.css
here is a sample of the code, I just embedded your HexColorPicker component under the root shadow
https://codesandbox.io/s/react-colorful-demo-forked-6vivtb?file=/src/App.js