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

Spec for the <div align> and <center> elements doesn't match reality. #10391

Closed
emilio opened this issue Jun 4, 2024 · 2 comments
Closed

Spec for the <div align> and <center> elements doesn't match reality. #10391

emilio opened this issue Jun 4, 2024 · 2 comments

Comments

@emilio
Copy link
Contributor

emilio commented Jun 4, 2024

What is the issue with the HTML Standard?

https://html.spec.whatwg.org/#flow-content-3:attr-div-align says to set text-align to center/left/right, and then do magic centering.

However, that doesn't match implementations, see w3c/csswg-drafts#10388.

Assuming w3c/csswg-drafts#10388 decides to specify this using the -webkit- prefixed keywords, would people be fine just mapping to that (matching reality)?

@Loirooriol
Copy link
Contributor

CSS Align added justify-items: legacy precisely to explain this behavior. So once browser implement that, the mapping should be

  • <center> and <div align="center"> into justify-items: legacy center; text-align: center
  • <div align="left"> into justify-items: legacy left; text-align: left
  • <div align="right"> into justify-items: legacy right; text-align: right

@annevk
Copy link
Member

annevk commented Jun 6, 2024

There's also #10149 and #3428? This should prolly be duplicated?

@zcorpan zcorpan closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants