justinribeiro / lite-youtube

The fastest little YouTube web component on this side of the internet. The shadow dom web component version of Paul's lite-youtube-embed.
https://www.npmjs.com/package/@justinribeiro/lite-youtube
MIT License
836 stars 63 forks source link

Remove `#frame::before`? #94

Open elibarzilay opened 1 year ago

elibarzilay commented 1 year ago

It took me a while to realize that the top shadow effect is coming from here and not from youtube...

Initially I thought about adding another attribute to specify the gradient, or the whole ::before etc -- but then I remembered this from CONTRIBUTING.md:

Anything that adds bloat or perf loss won't be accepted [...]

So for myself, I just nuked it, but following the same motto, it seems fitting to drop it -- if anyone wants to see a shadow, they can add one themselves, no?

justinribeiro commented 1 year ago

The reason it's there is that it holds the stock YouTube embed look and feel. In terms of bloat/perf loss, ::before doesn't add weight to the perf in the traces so I'm inclined to leave it as is.

On Tue, Jul 25, 2023, 9:41 PM Eli Barzilay @.***> wrote:

It took me a while to realize that the top shadow effect is coming from here and not from youtube...

Initially I thought about adding another attribute to specify the gradient, or the whole ::before etc -- but then I remembered this from CONTRIBUTING.md:

Anything that adds bloat or perf loss won't be accepted [...]

So for myself, I just nuked it, but following the same motto, it seems fitting to drop it -- if anyone wants to see a shadow, they can add one themselves, no?

— Reply to this email directly, view it on GitHub https://github.com/justinribeiro/lite-youtube/issues/94, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE5DL7QJVQ7NBDYJIV3333XSCNVXANCNFSM6AAAAAA2X73QWI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

elibarzilay commented 1 year ago

OK, that makes sense (and it did take me a while to realize where that shadow was coming from since it did feel like it's what youtube hands out...).

Would you mind adding some posterbare option that will drop it?

elibarzilay commented 1 year ago

Ping on this?