Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border color for tables #713

Open
atjn opened this issue Sep 18, 2024 · 1 comment
Open

Border color for tables #713

atjn opened this issue Sep 18, 2024 · 1 comment
Labels
focus-area-proposal Focus Area Proposal

Comments

@atjn
Copy link
Contributor

atjn commented Sep 18, 2024

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: whatwg/html#4398

@atjn
Copy link
Contributor Author

atjn commented Sep 19, 2024

Related proposal: #727

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
Status: No status
Development

No branches or pull requests

1 participant