Let embedded videos grow to natural width (with max 100%) if no width is specified in markdown
What does this MR do and why?
Currently embedded videos are fixed at 400px wide in descriptions and comments unless a specified width is passed. This is different from the behavior of images, which default to their natural width with a max of 100%.
This MR removes the default width="400" attribute on video elements and styles them to display at their natural width with a maximum width of 100% of the parent element, to match the behavior of images.
Screenshots or screen recordings
These screenshots show 3 videos:
- a video that is naturally wider than the rendered element that shows the description. In the before screenshot it is limited to 400px wide, in the after screenshot it grows to fill the width of the description.
- a video that is naturally narrower than 400px. In the first screenshot, it is stretched to 400px wide but in the second screenshot it is its natural width
- an embed of the first video again, but with a specified width in the markdown. This video appears the same way in both screenshots.
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Check out this branch
- In the GDK, create an issue and make sure you are using markdown
- Add a few video embeds to the description:
- A video with a large natural width
- A video that has a small natural width
- copy and paste the first video embed again, but add
{width=100}to the end
- Save the issue
You will see the first video expands to fill 100% of the parent element, the second one is the natural width of the video, and the third is 100px wide.
NOTE: this does not affect existing un-edited markdown. Videos that were embedded before this change will not be reparsed unless the markdown is meaningfully edited.

