Skip to content

align="justify" should align to start, not to left #10148

Open
@Loirooriol

Description

@Loirooriol

What is the issue with the HTML Standard?

https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3

The div element, when it has an align attribute whose value is an ASCII case-insensitive match for the string "justify", is expected to full-justify text within itself, as if it had its 'text-align' property set to 'justify' in a presentational hint, and to align descendants to the left.

However, all browsers I tested (Gecko, Blink, WebKit, Servo 2013) align to the start side, not to the left side. Testcase:

<!DOCTYPE html>
<div align="justify" style="border: solid; direction: rtl">
  <div style="width: 150px; background: cyan">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  </div>
</div>

The cyan box appears on the right, not on the left. I think the spec should be changed to reflect reality?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs testsMoving the issue forward requires someone to write teststopic: rendering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions