web-platform-tests / interop

web-platform-tests Interop project
https://wpt.fyi/interop
317 stars 27 forks source link

Border color for tables #713

Open atjn opened 1 month ago

atjn commented 1 month ago

Description

If I am writing a document with tables, I would like my table borders to be the same color as my text (by default):

Image of tables that are rendered in the same color as the sorrounding text

This works in Firefox but in Chrome, Edge, and Safari it looks like this:

Image of tables that are rendered in the same color as the sorrounding text, except that the outer border of the table is grey no matter what

It would be really nice if engines could standardize this behavior.

WPT tests to include

This issue is tested by the following two tests that should be included in Interop 2025:

Specification

border-color's initial value should be currentcolor: https://www.w3.org/TR/css-backgrounds-3/#border-color

There are no recommended stylesheets that override that value for tables: https://html.spec.whatwg.org/multipage/rendering.html#tables-2

Additional Signals

Workarounds

Many websites include a CSS reset that forces the behavior seen in Firefox. Here are two examples of popular CSS reset libraries doing that:

Browser bugs

There are long standing bugs to fix this issue for both engines:

Historical note

Chromium and Webkit sets a grey border color because it provided interoperability with old versions of Internet Explorer. The rule was previously part of the HTML spec but was removed in 2019: https://github.com/whatwg/html/pull/4398

atjn commented 1 month ago

Related proposal: #727