Bug 95123
| Summary: | <table> should have box-sizing: border-box in UA stylesheet | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ojan Vafai <ojan> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | a, eric, hyatt, jchaffraix, ntim, tony, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=243234 | ||
Ojan Vafai
Right now we implement this as hacks in RenderTable*. The html spec recently changed to require this http://html5.org/r/7278.
There's a difference in behavior from our current table code, but it brings us in line with gecko/opera. In standards mode a table element that is display:block should still be border-box, but we render it as content-box. Also, we'd correctly return border-box for the computed style of tables instead of content-box and web sites would be able to override it to make their tables be content-box.
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=1621
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=1622
In gecko, opera, webkit a div that is display:table currently defaults to content-box.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Aleksandar Totic
FYI: Chrome will be fixing table's default box-sizing for the next release, patch is on its way:
https://chromium-review.googlesource.com/c/chromium/src/+/2003810
Tim Nguyen (:ntim)
This is consistent with other browsers, and part of the spec: https://html.spec.whatwg.org/#tables-2
https://wpt.fyi/results/html/rendering/non-replaced-elements/form-controls/resets.html?label=master&label=experimental&aligned
This WPT is part of Interop 2022.
Radar WebKit Bug Importer
<rdar://problem/93341589>
Tim Nguyen (:ntim)
*** This bug has been marked as a duplicate of bug 243234 ***