New issue
Advanced search Search tips

Issue 688091 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Blink seems to ignore "width:0px" on <table> (but honors "width: 1px")

Project Member Reported by dholb...@gmail.com, Feb 2 2017

Issue description

Chrome Version: Version 55.0.2873.0 dev (64-bit)
OS: Ubuntu 16.10

What steps will reproduce the problem?
(1) Load https://jsfiddle.net/p2amfxy9/

What is the expected result?
The two bordered tables should look the same -- each should be at its minimum intrinsic width & should wrap its text to 3 lines.

What happens instead?
Inexplicably, the first table (the one with 0px) doesn't respect its width at all -- it's the contents' full preferred width, as if it had width:auto.

Please use labels and text to provide additional information.
This testcase simply has two copies of <table><td>a b c</td></table> with width:0px on the first and 1px on the second.
Here's a slightly larger testcase with even more sizes: https://jsfiddle.net/u3dq3y0f/  As you can see there, progressively-smaller "width" values produce progressively skinnier tables (down to the minimum intrinsic width), EXCEPT that Chrome seems to have some special case that rejects 0px widths.

Firefox (54) and Edge (14) both produce "expected result".  So this is a bit of an interoperability issue. 
 
Status: Available (was: Untriaged)
Thanks for filing. WebKit nightly behaves like chrome so it's not something we introduced lately, just another difference in behavior, sigh.

Comment 2 by dholb...@gmail.com, Feb 2 2017

Note: all major browsers treat 0px as auto in the width *attribute* on <table>. Here's a testcase with that:
 https://jsfiddle.net/5aqfr1Lc/

Presumably that attribute isn't (or at some point wasn't) well-defined in specs, so it developed a quirky behavior.

However, CSS properties & their effects on sizing are pretty well defined, which is probably why "0px" behaves more sanely/consistently there (in Firefox & Edge).  See also https://bugzilla.mozilla.org/show_bug.cgi?id=417826#c5

Comment 3 by ojan@chromium.org, Mar 7 2017

Cc: -ojan@chromium.org
Project Member

Comment 4 by sheriffbot@chromium.org, Mar 8 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: -cbiesin...@chromium.org
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)

Sign in to add a comment