RESOLVED FIXED195016
table border-color should be currentColor by default, not gray
https://bugs.webkit.org/show_bug.cgi?id=195016
Summary table border-color should be currentColor by default, not gray
Daniel Holbert
Reported 2019-02-25 14:19:55 PST
(This bug covers some behavior that's common between Blink & WebKit. I've filed https://bugs.chromium.org/p/chromium/issues/detail?id=935729 on Blink.) STR: (1) Load https://jsfiddle.net/a6n0cb9j/ EXPECTED RESULTS: The borders should all be the same color. ACTUAL RESULTS: Safari 12 uses a grey border for the table, but a black border for the td and th. Firefox 65 [1], Edge 18, and IE11 all give EXPECTED RESULTS, rendering both borders as black (via `currentColor`). Technically the WHATWG HTML spec says all three borders should be grey, via this rule: > table, td, th { border-color: gray; } https://html.spec.whatwg.org/multipage/rendering.html#tables-2 ...but I think we should remove that entirely because code-archeology seems to indicate that this was for compatibility with IE at the time[2], and IE itself doesn't have this behavior anymore. I've filed https://github.com/whatwg/html/issues/4391 on making this spec change. [1] Firefox renders both borders black if the testcase is in standards-mode, or both gray in quirks mode. But I'd like to remove the quirks-mode behavior. [2] Reference for code-archeology on the ancient-IE compat note: https://bugzilla.mozilla.org/show_bug.cgi?id=84307#c20 ("IE and Opera, which always use gray" back in 2006. Nowadays IE uses currentColor, i.e. black by default.)
Attachments
Radar WebKit Bug Importer
Comment 1 2019-02-25 16:27:24 PST
Ahmad Saleem
Comment 2 2022-08-20 17:28:15 PDT
I am able to reproduce this bug in Safari 15.6.1 and Safari Technology Preview 151 using JSFiddle from Comment 0 and it show "Grey" outer border but "black" for TD and TH. It matches with Chrome Canary 106 but differ from Firefox Nightly 105, which shows "Black" for both cases. Just wanted to share updated testing results. Thanks!
Ahmad Saleem
Comment 3 2022-10-28 16:22:38 PDT
These are causing us to fail: Standard Mode: https://wpt.fyi/results/html/rendering/non-replaced-elements/tables/table-border-3s.html?label=experimental&label=master&aligned Quirk Mode: https://wpt.fyi/results/html/rendering/non-replaced-elements/tables/table-border-3q.html?label=experimental&label=master&aligned _____ We need to get rid of this: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/css/html.css#L235 I think from Comment 0, it seems that Webkit does not have any special quirk mode and I cannot find anything here as well: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/css/quirks.css ____ I am happy to do PR and change it to "currentColor". Although, I will wait for Karl to land his "hr" fix to html.css because it will lead to conflict for him otherwise. If it is something, we should avoid right now, happy to get broader view from others as well (for my learning).
Ryosuke Niwa
Comment 4 2022-10-28 22:02:54 PDT
Seems sensible to match the spec.
Tim Nguyen (:ntim)
Comment 5 2024-09-19 10:55:05 PDT
We just need to remove this rule: https://searchfox.org/wubkat/rev/b36cbce69fddb7da33823f316bd8ead5bebee970/Source/WebCore/css/html.css#280 Main challenge is to do all the test rebaselines.
Karl Dubost
Comment 6 2024-09-19 12:06:18 PDT
EWS
Comment 7 2024-12-15 17:21:41 PST
Committed 287861@main (699845bc1910): <https://commits.webkit.org/287861@main> Reviewed commits have been landed. Closing PR #33916 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.