align-self: unsafe start does not stop a position-area box from being shifted to fit the viewport
Categories
(Core :: Layout, defect, P3)
Tracking
()
People
(Reporter: dao, Unassigned)
References
Details
Attachments
(1 file)
A position-area box whose height comes from its content is moved back over its anchor so that it fits inside the viewport, whenever it is taller than the space the position area leaves below the anchor and still shorter than the viewport. align-self: unsafe start should opt out of that: per css-align-3 § overflow-values, unsafe tells the UA to honour the specified alignment however the box overflows. It makes no difference, and neither do unsafe flex-start or unsafe self-start.
The attached testcase runs itself and writes its results into a table. Each row opens the same popover with one align-self value and a box height relative to the range the shift fires in. The last two rows are controls, with the box shorter and taller than that range.
Firefox 158.0a1, local opt build 20260915151508, 682px viewport:
| align-self | box | popover top | anchor bottom | shifted |
|---|---|---|---|---|
| (unset) | 287px, in range | 395 | 412 | yes |
| start | 287px, in range | 395 | 412 | yes |
| safe start | 287px, in range | 395 | 412 | yes |
| unsafe start | 287px, in range | 395 | 412 | yes |
| unsafe flex-start | 287px, in range | 395 | 412 | yes |
| unsafe self-start | 287px, in range | 395 | 412 | yes |
| (unset) | 205px, below | 412 | 412 | no |
| (unset) | 820px, above | 412 | 412 | no |
Chromium 152.0.7977.82 honours all three unsafe forms in the same testcase, holding the box at the anchor's bottom edge and letting it overflow; only the unset default and bare start shift.
This is the mechanism behind bug 2072548, where the address bar's results view was placed over the address bar in a short window. That is worked around there with a max-height clamp.
| Reporter | ||
Comment 1•2 months ago
|
||
Comment 2•2 months ago
|
||
The severity field is not set for this bug.
:tlouw, could you have a look please?
For more information, please visit BugBot documentation.
Comment 3•1 month ago
|
||
Doesn't break anything and there is a workaround. Also doesn't look like the unsafe start's are covered by wpt.
Description
•