ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

Expose shadow-dom using parts

Open bernbecht opened this issue 5 years ago • 3 comments

Hello 👋

It would be very helpful if you could expose the shadow-dom of the components using parts, so one could fine tune some css properties

Thank you ✌️

bernbecht avatar Apr 16 '21 13:04 bernbecht

Hi @Berhell

I'll forward this issue to the ui5-webcomponents repo, as the pure web-components are developed by them.

Besides that you can use the addCustomCSS(tag, css) function to change the styles of shadow-dom elements. I created an example where I changed the ui5-button-root class of the Button component to red. You can find it here

Lukas742 avatar Apr 16 '21 14:04 Lukas742

Hi @Berhell

We have exposed some CSS parts that make sense to us. If you have some specific parts that you need, please attach them in this issue, so that we can take a look and decide if we are going to implement them. In the meantime, you can use the addCustomCSS method as described above

fifoosid avatar Apr 21 '21 12:04 fifoosid

The addCustomCSS(tag, css) would be enough for now. Thanks for the tip 😉

bernbecht avatar May 07 '21 13:05 bernbecht