Intent to prototype and ship: make width and height map to aspect-ratio for <video>, <canvas> and <input type=image>

Skip to first unread message

Emilio Cobos Álvarez

Mar 24, 2021, 10:49:35 AMMar 24
to Mozilla
Summary: We do this for <img> already, and HTML was changed a while ago
to do this for <video> / <canvas> / <input type=image>.

It seems like an uncontroversial change.



> The width and height attributes map to the aspect-ratio property on
img, canvas, and video elements, and input elements with a type
attribute in the Image Button state.

There are some edge cases about <canvas> and zero-valued attributes
which I've filed as

Platform coverage: all

DevTools bug: N/A

Other browsers:

* Chrome: They implement that though I don't know if it's shipped or
not ( / /

* Safari: They only implement <img> I _think_.

There's another follow-up change we need to implement which is
supporting it in <source> elements for <picture>, but that's a more
involved change.


-- Emilio
Reply all
Reply to author
0 new messages