New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"0" should not be an error in "rules for parsing dimension values" #201
Comments
|
I'm tempted to make everything here support 0. @dbaron do you happen to know if something here is known to break the Web if 0 is supported (e.g. |
I think when I was rewriting table width calculation in Gecko, I discovered pretty quickly that width=0 needed to be ignored. So I suspect the Web does rely on that, although I'm not sure. |
Then again, I'm clearly misremembering, since I didn't rewrite that part. I probably discovered it quickly while writing my own testcases. |
(Though it might be that some browsers ignore the CSS 'width: 0px' on table cells, and some don't, leaving the quirkiness only in the HTML attribute parsing. So it might be Web-compatible in some browsers but not others.) |
http://webdevdata.org/ data set 2015-01-08 (780 Mb) 87,000 pages.
I inspected the matches in Nightly and applied So I suppose we should keep ignoring 0 and 0% for the table-related elements... |
Browsers are case-insensitive for the attribute value of `type` attribute selectors for all HTML elements, but they should be case-sensitive for `ol` and `li` in the UA stylesheet. Fixes #201.
(The above PR referenced this issue by mistake; now fixed.) |
Browsers support `width="0"` for `img` and related elements but in general not for table-related elements (e.g. `td`). Fixes #201.
Browsers support `width="0"` for `img` and related elements but in general not for table-related elements (e.g. `td`). Fixes #201.
https://html.spec.whatwg.org/multipage/rendering.html#dimRendering
https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-dimension-values
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3638
is different from
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3639
(at least in webkit/blink/gecko, haven't checked IE/Edge)
so this algorithm should be able to return 0 instead of error. But we need to check other uses and check if they want to apply 0 or not.
The text was updated successfully, but these errors were encountered: