LottieFiles / lottie-player

Lottie viewer/player as an easy to use web component! https://lottiefiles.com/web-player
MIT License
1.55k stars 175 forks source link

Remove id attributes when disableShadowDOM="true" #236

Open tomasdev opened 8 months ago

tomasdev commented 8 months ago

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.

samuelOsborne commented 8 months ago

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

tomasdev commented 8 months ago

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 commented 8 months ago

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

samuelOsborne commented 8 months ago

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

tomasdev commented 8 months ago

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