elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
6.24k stars 1.14k forks source link

Designer Shadow DOM #2976

Open sfmskywalker opened 2 years ago

sfmskywalker commented 2 years ago

In order to enable easy re-hosting of the workflow designer component, the component should work within a shadow DOM.

StencilJS supports generating Shadow DOM components, but there are challenges to using this when working with third-party libraries such as Antvis X6 and Monaco Editor.

The challenges are:

Some guidance & possible workarounds:

tomy2105 commented 2 years ago

Encapsulation, from programming perspective is always nice. However, I kind of liked the fact that you can "style" Elsa elements using global CSS (althought I faces troubles when Elsa CSS also styled my own ones :)). When using shadow dom how will you enable "end" application to style Elsa components?

sfmskywalker commented 2 years ago

Yeah good point - we should still be able to customize the look & feel by CSS-targeting the shadow DOM. Which should be possible with the :shadow pseudo element and/or shadow parts.

https://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/#toc-style-cat-hat https://css-tricks.com/styling-in-the-shadow-dom-with-css-shadow-parts/