Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-anchor-position-1] Define scroll interaction better. #10858

Open
emilio opened this issue Sep 9, 2024 · 1 comment
Open

[css-anchor-position-1] Define scroll interaction better. #10858

emilio opened this issue Sep 9, 2024 · 1 comment

Comments

@emilio
Copy link
Collaborator

emilio commented Sep 9, 2024

In #9598 it was resolved that anchor() computed to a pixel value, which ended up in edits in https://drafts.csswg.org/css-anchor-position-1/#scroll and elsewhere such that some scroll adjustment is snapshotted every frame (at an undefined time).

That timing should be defined. The spec says:

Define the precise timing of the snapshot: updated each frame, before style recalc.

But before style recalc seems wrong? The scroll position there depends on whether somebody had updated layout before, or otherwise it flickers... Or something like that?

  • What should be the timing of that operation?
  • Also, presumably we should also change the used value definition of the inset properties to add that offset, so that div.style.left = getComputedStyle(div).left round-trips? But it is super-weird that the position getComputedStyle() returns depends on whether you're before or after style recalc... wat?

I still think it'd be easier if we just didn't do the interleaving dance but... ;)

cc @dshin-moz, @andruud, @tabatkins, @fantasai

@emilio
Copy link
Collaborator Author

emilio commented Sep 9, 2024

It's also unclear what:

At least one anchor() function on query el’s used inset properties in the axis refers...

Really means, since anchor() is supposed to go away at computed-value time? So if interpreted naively, that condition would never match...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Thursday afternoon
Development

No branches or pull requests

1 participant