lottie-player icon indicating copy to clipboard operation
lottie-player copied to clipboard

Remove id attributes when disableShadowDOM="true"

Open tomasdev opened this issue 1 year ago • 5 comments

Using multiple players end up creating DOM with repeated IDs: "#animation" and "#animation-container" -- these could be replaced with classes instead.

I am not sure of the implications when using Shadow DOM.

tomasdev avatar Jan 17 '24 15:01 tomasdev

hi @tomasdev whats your use case for not having shadowDOM enabled?

samuelOsborne avatar Jan 17 '24 15:01 samuelOsborne

Colorizing the paths using CSS (single color Lottie files) -- icons animations.

In addition, not using Shadow DOM makes the controls not show up when controls="true"

tomasdev avatar Jan 17 '24 16:01 tomasdev

I think (untested) we could colorize the paths if the SVG was slotted when using Shadow DOM.

tomasdev avatar Jan 17 '24 16:01 tomasdev

the problem with repeating ids shouldnt be an issue though no? As its inside the shadow dom they dont conflict

samuelOsborne avatar Jan 18 '24 11:01 samuelOsborne

This is when shadow dom is off, as title suggests

On Thu, Jan 18, 2024 at 6:58 AM SamuelOsborne @.***> wrote:

the problem with repeating ids shouldnt be an issue though no? As its inside the shadow dom they dont conflict

— Reply to this email directly, view it on GitHub https://github.com/LottieFiles/lottie-player/issues/236#issuecomment-1898342984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACY4AIEB5KUIK33FIUQLELYPEE47AVCNFSM6AAAAABB6Y2Y66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJYGM2DEOJYGQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Tomás Roggero https://tomasroggero.com

tomasdev avatar Jan 18 '24 15:01 tomasdev