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-collapse: collapse is problematic in Safari #15192

Open
vladmoroz opened this issue Nov 26, 2024 · 2 comments
Open

border-collapse: collapse is problematic in Safari #15192

vladmoroz opened this issue Nov 26, 2024 · 2 comments

Comments

@vladmoroz
Copy link

vladmoroz commented Nov 26, 2024

Preflight styles set border-collapse: collapse, which bugs how semi-transparent borders are rendered in Safari.

Given this CSS:

table {
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

Chrome and Firefox render the border once:

Safari renders the border twice, so it appears stronger:

More of a Safari than a Tailwind issue per se, but the blast radius for using a potentially bugged property is quite large. In my projects I'm resetting border-collapse: unset to avoid this.

What version of Tailwind CSS are you using?

v3 / v4

What browser are you using?

Safari

Reproduction URL

https://jsfiddle.net/e0vgLphy/9/

@adamwathan
Copy link
Member

Wow that's horrible 😖 Do you do anything to work around the extra space that's rendered inside the table cells?

@vladmoroz
Copy link
Author

Just border-spacing: 0 and I never style adjacent borders 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants