HTML spec says tables should have `border-color:gray`, but we only do that in quirks mode
Categories
(Core :: Layout: Tables, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
()
Details
Attachments
(5 files, 1 obsolete file)
The html spec says that tables should have border-color:gray:
table, td, th { border-color: gray; }
We specify that in our quirks-mode stylesheet, so we only give tables gray borders in quirks mode, but we give them black (i.e. default-color) borders in standards mode.
https://searchfox.org/mozilla-central/rev/dc0adc07db3df9431a0876156f50c65d580010cb/layout/style/res/quirk.css#55-60
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
•
|
||
Here are how different browsers render the attached testcases (listing the border colors as "outer/inner", i.e. "table/td"):
Firefox 67 Chrome 74 and Safari 12 Edge 18 & IE11
Standards-mode colors: black/black gray/black Black/Black
Quirks-mode colors: gray/gray gray/black Black/Black
So:
- We're the only browser to have a difference based on quirks-mode.
- We're the only browser to ever render gray borders for the td (and th) elements (though it's what the spec says we're supposed to do).
- We have a comment saying our gray color is "for compatibility" (presumably with IE, in the old days), but Edge/IE don't have any special non-default border-coloring behavior for tables anymore (!!)
Maybe we should just get the spec updated? Given the lack of compatibility here and the agreement between Edge and Firefox (and Chrome for td/th), I'm not sure it's useful for HTML to specify a special default "border-color" for table elements that disagrees with the browser ~consensus.
| Assignee | ||
Comment 3•6 years ago
|
||
It looks like our quirks-mode rule dates back to https://bugzilla.mozilla.org/show_bug.cgi?id=84307#c20
See also bug 370833 -- the testcases on that bug are interesting (using <table border>) and seem to behave a bit differently...
| Comment hidden (obsolete) |
| Assignee | ||
Comment 5•6 years ago
|
||
| Assignee | ||
Comment 6•6 years ago
|
||
I filed https://github.com/whatwg/html/issues/4391 on fixing the spec.
| Assignee | ||
Comment 7•6 years ago
|
||
And I filed https://bugs.chromium.org/p/chromium/issues/detail?id=935708 and https://bugs.webkit.org/show_bug.cgi?id=195015 on the Chrome/Safari (Blink/WebKit) magic behavior for inset/outset cells' border colors (which is shown in the middle section of testcase 3).
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 8•6 years ago
|
||
Let's see if we can just remove this quirk.
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c566483359cc82d6949575bfe8d68c2e3da69c33
| Assignee | ||
Comment 9•6 years ago
|
||
This quirk was originally for compatibility with IE, but IE doesn't have this
special behavior anymore (in quirks-mode or in standards-mode).
And Blink/WebKit have yet another set of behaviors, which are also not
quirks-mode-dependent, and vary depending on the part of the table:
https://bugs.chromium.org/p/chromium/issues/detail?id=935708
https://bugs.chromium.org/p/chromium/issues/detail?id=935729
| Assignee | ||
Comment 10•6 years ago
|
||
Try run is green, which means we don't have any test coverage for this quirk (I should probably add some before landing).
| Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Comment 11•6 years ago
|
||
Depends on D21175
| Assignee | ||
Updated•6 years ago
|
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8ff9537201ef
https://hg.mozilla.org/mozilla-central/rev/72127702116c
| Assignee | ||
Comment 16•6 years ago
|
||
The "can't merge" reason is bogus; I left a comment in the pull request.
Description
•