Markup proposal: do videos like the new quotes.
May 04, 2022, 05:07:28 pm
Same idea: simplify things by wrapping the header inside the video tag itself. At the moment you have the header tag outside the video tag, so when it comes to controlling width you have two tags to deal with. At the moment, on a wide screen, having the link for the video full width, even when the video itself is only a fraction of that width, is a bit of a UX nuisance sometimes. IMO it would make sense to rearrange things so you only have one tag to deal with. (Incidentally, I'm also thinking a BBC float tag and/or flexbox tag could be handy too. Allow images and videos to stack side by side when there is enough room.)
Re: Markup proposal: do videos like the new quotes.
Reply #1 – May 04, 2022, 07:10:38 pm
That video tag markup has always been .. umm .. less than ideal, and it actually got some 2.0 cleanup! I'll take a look at moving the header inside the tag and see if that cleans things up. I like the idea of being able to stack videos side by side, that could look pretty cool on wide screens. Maybe something with a tag attribute could work, but right now most (I think) users just plop the link in place and let the system do "its magic" of auto embedding. Maybe some CSS magic with child or sibling could work, or may need some JS.
Re: Markup proposal: do videos like the new quotes.
Reply #4 – May 06, 2022, 02:20:03 pm
Sidenote, I don't know how the aspect ratio of a video is currently determined but CSS has an aspect-ratio attribute now.
Re: Markup proposal: do videos like the new quotes.
Reply #7 – May 06, 2022, 05:21:39 pm
I really tried to do just that, but I could not get it to be fully responsive. Even tried flexbox but got the same results. I could get the initial side by side with just the preview images to work fine, but once you clicked on one of the images, and the iframe loaded, things got a wonky and the frame would collapse to a postage stamp size (w/o having a set width). I would much prefer for them to just take care of themselves and not have the darn break points.
Re: Markup proposal: do videos like the new quotes.
Reply #8 – May 06, 2022, 05:56:25 pm
Ok, so why can't you just set a width on the iframe that is taken from the video size, and with a max-width set to 100%? That way they should stack automatically if the available width is less than two frame widths, and the frame/vids should still scale down if available width is less than one frame width. I still can't see why you need break points at all.
Re: Markup proposal: do videos like the new quotes.
Reply #9 – May 06, 2022, 07:05:47 pm
There is a width/height on the iframe tag ... it just seems inline-block does not honor it and just collapses to some minimal size. The only way I could work around that was to set that width on the div when the screen was wide enough to warrant the side by side view. I tried flex and inline flex as well but was having some of the same issues, left me perplexed!
Re: Markup proposal: do videos like the new quotes.
Reply #10 – May 06, 2022, 07:10:16 pm
Ok, that is very strange. I'm sure there will be a way around it that doesn't involve spaghetti.
Re: Markup proposal: do videos like the new quotes.
Reply #11 – May 06, 2022, 07:55:26 pm
Agreed ... If you find the sauce, please share!
Re: Markup proposal: do videos like the new quotes.
Reply #13 – May 06, 2022, 10:12:52 pm
Only thing I notice is that the video is not responsive when you shrink the window, it simply overflows once the screen gets to small.