Skip to content

The "anonymous button content box" isn't centered horizontally #12701

Description

@Loirooriol

What is the issue with the HTML Standard?

https://html.spec.whatwg.org/multipage/rendering.html#anonymous-button-content-box

If the box does not overflow in the horizontal axis, then it is centered horizontally.

I would then expect

<!DOCTYPE html>
<button style="width: 100px; text-align: left">foo<br>barbaz</button>
Image

But Gecko, Blink & WebKit agree it looks like this:

Image

So the only centering in the inline axis is because of text-align: center in the UA stylesheet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions