13rac1 / goldmark-embed

A Video embed extension for the goldmark markdown parser.
MIT License
4 stars 2 forks source link

Remove explicit width and height #4

Open prologic opened 1 year ago

prologic commented 1 year ago

Please remove the explicit width and height attributes. Let CSS handle this.

hugovdm commented 2 months ago

I believe the width and height attributes are explicit due to them being required by the YouTube API: https://developers.google.com/youtube/iframe_api_reference

I see fundipper went for passing the attribute values via parameters to a NewExtender constructor:https://github.com/fundipper/goldmark-videos

Some other interesting discussions around more responsive youtube embeds include this one: https://stackoverflow.com/questions/35814653/automatic-height-when-embedding-a-youtube-video These examples still contain the hard-coded width and height iframe attributes, but use CSS on an encapsulating div to get better behaviour.