Open Bug 1879957 Opened 7 months ago Updated 7 months ago

Generalize "percent-height quirk" to apply to block axis (or root element's block axis)

Categories

(Core :: Layout, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(4 files)

[Spinning this off from bug 1687557 comment 14 and associated comments.]

We've got a quirks-mode behavior where percentage heights resolve against the height of the root element, or something to that effect.

This is specced here:
https://quirks.spec.whatwg.org/#the-percentage-height-calculation-quirk

In Chromium and WebKit, it looks like this applies in the body element's block axis, I think. We should probably align with them, for interoperability, since there's no strong reason this quirk should be vertically-biased in the absence of vertical writing-modes.

Here's testcase to demonstrate. Chrome/WebKit honor the 90% block-size in this case, Firefox does not.

(We do honor it if you remove the vertical writing-mode, making the block-size a height rather than a width.)

This quirk isn't specific to the root, actually; here's a testcase where it's a div that provides the concrete size to resolve percentages against.

Chrome/WebKit resolve the percent in this case (drawing a bunch of lime area). Firefox draws no lime (resolving the percent to zero).

This is a variant of testcase 2, with vertical-lr nested inside of vertical-rl. This block-flow direction-flip doesn't serve as a blocker for Chromium/WebKit when they're tunneling up to find a percent basis.

Here's a testcase with a grid of scenarios. In Chromium/WebKit, the center-right, bottom-left, and bottom-right examples are blank (I think because the span with an orthogonal writing-mode from its parent ends up forming a box that blocks the traversal).

Assignee: nobody → dholbert
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: