whatwg / whatwg/html

width and height attirbute should allow decimal point values

Open
#533 2 comments 0 reactions 1 assignee View on GitHub

@zcorpan is already working on this.

Since Jan 19, 2016.

addition/proposal needs implementer interest normative change topic: img
Dominant language
HTML
Stars
9.4k
Forks
3.2k
Avg merge
3d 9h
Merged PRs (30d)
38

Description

Currnet HTML specification says that the width and height attributes on img, iframe, embed, object, video and input element are valid non-negative INTEGERS. https://html.spec.whatwg.org/multipage/embedded-content.html#attr-dim-width

On the other hand, 'width' and 'height' CSS property corresponding to them are which allows decimal point. https://www.w3.org/TR/CSS2/visudet.html#the-width-property

I noticed it, when checking the HTML5 elements in SVG subtrees chapter of the SVG2 draft. It will cause confusion, since width and height attribute of SVG's graphics elements allows decimal point. https://svgwg.org/svg2-draft/embedded.html#HTMLElements

Furthermore, I have noticed that webkit and blink handles the width and height attribute of html as decimal point values.
See this test: http://svg2.mbsrv.net/devinfo/devstd/embedWH/

Please take into consideration that width and height of html attribute allow decimal point values.

NOTE: This report was posted in accordance with the reply on the post to bugzilla of w3c. https://www.w3.org/Bugs/Public/show_bug.cgi?id=29378

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.