`position-try: normal [...]` fails to parse because we disabled `position-try-order`
Categories
(Core :: Layout: Positioned, defect)
Tracking
()
People
(Reporter: gundersen, Unassigned)
References
Details
Attachments
(1 file)
|
906 bytes,
text/html
|
Details |
See https://codepen.io/mariusgundersen/pen/WbwPWVj
The popover is not positioned correctly near the edges:
- At the top of the page the
position-try: normal flip-blockis not applied, so the popover is positioned outside the viewport - At the (bottom) left edge the popover is positioned all the way to the right, while at the right edge it's positioned all the way to the left
Comment 1•1 month ago
|
||
- At the top of the page the position-try: normal flip-block is not applied, so the popover is positioned outside the viewport
We don't yet support position-try-order which is corresponding to normal part of the position-try shorthand, so parsing of it is disabled by Bug 2002813. Not specifying normal in the shorthand works around this issue.
:emilio, I wonder if it's worth just parsing normal for the shorthand, since well, that is the current behaviour anyway.
- At the (bottom) left edge the popover is positioned all the way to the right, while at the right edge it's positioned all the way to the left
Should be fixed by Bug 2004040.
Changing title of the bug to focus on potentially letting us parse position-try-order: normal.
Comment 2•1 month ago
|
||
I think parsing position-try: normal flip-block or so seems fine. However even with that fixed, there seems to be an issue related to the margin.
If I make the popover use margin: 0 instead of margin: 1em then I get the expected behavior. I think bug 2004040 might need to nudge the margin rect rather than the border-box rect?
Comment 3•1 month ago
|
||
Comment 4•1 month ago
|
||
We do - In fact the alignment function should just be receiving the margin box.
... Ah, we're clearing margins when anchor-center here, Should only apply when auto.
Comment 5•1 month ago
|
||
Bug 1989059 has implemented & enabled position-try-order, so I think there's no reason to special-case parsing normal in the shorthand at this point.
Updated•1 month ago
|
Description
•