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] Clarify computed value serialization for anchor-scope #11774

Open
tuankiet65 opened this issue Feb 25, 2025 · 1 comment

Comments

@tuankiet65
Copy link
Contributor

anchor-scope takes the following value:

none | all | <dashed-ident>#

If the value is a list of <dashed-ident>, it's not clear if the computed value serialization should preserve the order as in the original list.

For example, if the original value is:

anchor-scope: --a, --b, --c

is this an acceptable computed value serialization:

anchor-scope: --b, --a, --c
@fantasai
Copy link
Collaborator

The current spec says the Computed Value is "as specified", so I think that would imply preserving the order. But whether it should or not is a legit question, since the behavior doesn't really care about order.

From a computed value perspective, we shouldn't care, and both of those should be treated as equivalent. From a serialization perspective, though, we need to define an order, and specified order is convenient because it doesn't defining require a sorting algorithm...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants