Skip to content

preflight.css overwrites default margin: auto for [popover] elements. #17593

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

Closed
crswll opened this issue Apr 7, 2025 · 4 comments
Closed

preflight.css overwrites default margin: auto for [popover] elements. #17593

crswll opened this issue Apr 7, 2025 · 4 comments

Comments

@crswll
Copy link

crswll commented Apr 7, 2025

What version of Tailwind CSS are you using?

For example: v4

What build tool (or framework if it abstracts the build tool) are you using?

For example: NA

What version of Node.js are you using?

For example: NA

What browser are you using?

For example: NA

What operating system are you using?

For example: NA

Reproduction URL

https://play.tailwindcss.com/5vL9gz1YK3

Describe your issue

preflight.css overwrites the default margin: auto for [popover] UA styles. Maybe not a bug but doesn't seem intuitive either? Thought I'd mention it.

Image

@philipp-spiess
Copy link
Member

Hmm I agree that this is probably not what we wanted here but now that 4.0 has been shipped with this, it's a breaking change to undo that I think that I'd like to avoid doing in a patch release, hmm. I'm surprised this didn't get reported earlier. I suggest for now that you overwrite the popover styles to match what you want it to for now and we'll reconsider this with the next breaking change release 😬

@crswll
Copy link
Author

crswll commented Apr 23, 2025

Absolutely.

This made me really think about just how risky * { ... } is. A ton of websites have likely opted into unsetting that unknowingly through various CSS reset techniques. I wonder what else it effects and will likely effect in the future.

@philipp-spiess
Copy link
Member

Yeah, agreed. 🤔

I'm going to close this issue for now though since it's not actionable in the short-term. Thanks for reporting this, though!

@philipp-spiess philipp-spiess closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2025
@crswll
Copy link
Author

crswll commented Apr 24, 2025

No problem!

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

No branches or pull requests

2 participants