Open Bug 2010246 Opened 3 months ago Updated 2 months ago

[css-anchor-position] Positioned frames using anchor-center only in 1 axis does not do overflow check properly

Categories

(Core :: Layout: Positioned, defect)

defect

Tracking

()

Tracking Status
firefox149 --- affected

People

(Reporter: jakea, Unassigned)

Details

(Whiteboard: [anchorpositioning:triage])

Attachments

(1 file)

Attached video Demo

https://codepen.io/t_afif/pen/QwyMrvG

Drag the anchor around. It seems to correctly flip between top and bottom, but does not flip to the side.

Safari has the same issue. Chrome seems to do the right thing. However, I'm not confident in which behaviour is correct as per the spec.

Ignore the issue with the position of the arrow, I'll file that separately.

Hmm, with Chrome:

position-area: top; /* top span-al l*/
justify-self: unsafe anchor-center;
position-try: flip-block, --size flip-start, --size flip-start flip-inline;

As I trigger flipping to sides, I see the computed value of position-area becoming left and right - I don't see anything in spec that would support this.

https://drafts.csswg.org/css-anchor-position-1/#execute-a-try-tactic is it covered by the final point of step 4 here?

The severity field is not set for this bug.
:jwatt, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(mozmail)

(In reply to Jake Archibald [:jakea] from comment #2)

https://drafts.csswg.org/css-anchor-position-1/#execute-a-try-tactic is it covered by the final point of step 4 here?

Ah, I didn't fully understand flip-start here. It swapped top with left, not span-all with left.

When we check overflow, we use inset-modified containing block. This example just uses anchor-center in horizontal axis.

Insets get set to 0 upon setting 1anchor-center, and we compare Inset-Modified Containing Block size vs. positioned frame's margin box, and we determine that we always fit.

Severity: -- → S3
Flags: needinfo?(mozmail)
Summary: position-try doesn't seem to work as expected → [css-anchor-position] Positioned frames using anchor-center only in 1 axis does not do overflow check properly
Whiteboard: [anchorpositioning:triage]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: