kazzkiq / CodeFlask

A micro code-editor for awesome web pages.
https://kazzkiq.github.io/CodeFlask/
MIT License
1.07k stars 120 forks source link

Enable Shadow DOM by default #119

Open kazzkiq opened 4 years ago

kazzkiq commented 4 years ago

CodeFlask depends on specific CSS in order to keep sync between <textarea>, <pre> and <code> blocks.

More than often, users face issues were a project already has imperative CSS code that styles those elements, and this leads to misconfigurations in CodeFlask editor instances (aka. Page CSS leaks into CodeFlask elements).

A good way to prevent this is using Shadow DOM whenever creating a CodeFlask instance, so there is no risk of CSS leakage in or out the editor.

kazzkiq commented 4 years ago

Related Issues that would be fixed by this approach: #109, #106, #104