Skip to content

writing-mode propagation from body to document element is annoying #4357

Closed
@emilio

Description

@emilio

So in #3066 we resolved (hesitantly) that we'd propagate the writing-mode from the <body> element to the <html> element, at used value time.

As far as I can tell, WebKit and Blink propagate the writing-mode to the viewport, but not to the root, and the actual propagation to the root would be hard for them to implement it.

@aethanyc has an implementation of this in Firefox (https://phabricator.services.mozilla.com/D45481, https://bugzilla.mozilla.org/show_bug.cgi?id=1102175).

Handling correctly the edge cases like:

  • Inserting a new <body> element before the existing primary body.
  • Removing and handling the style changes on the primary <body> element.
  • Propagating the used writing mode to all the anonymous boxes generated by the <html> element, if it has display: table, for example.

Takes quite a bit of pretty unfortunate special-casing that in my (personal) opinion is not worth it.

Given that that resolution doesn't point to a clear path path to interop (since WebKit / Blink are quite unlikely to adopt it from what I can tell, since they don't store the writing mode separately from the style), can we instead not do any propagation (i.e., do what Gecko does right now), and maybe add warnings to the console when the <body>s writing-mode / direction / text-orientation differs from the <html>?

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