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-easing-1] Clarify computed values and serialization #8723

Open
fantasai opened this issue Apr 14, 2023 · 1 comment
Open

[css-easing-1] Clarify computed values and serialization #8723

fantasai opened this issue Apr 14, 2023 · 1 comment

Comments

@fantasai
Copy link
Collaborator

The CSS Easing spec has a section on serialization, however this section doesn't distinguish between specified and computed values (and seems to be defining the computed value serialization). Should there be any differences between these two? E.g.

  • Should specified values of step-end and step-start be serialized as themselves rather than as a steps() function?
  • Should the jump-end and end keywords be kept as distinct specified values?

Relatedly, the spec seems a bit confused about the computed/serialized values for start/end/jump-start/jump-end: the serializations of the “end” values are collapsed to a single serialization, but not the “start” values. I think

  • jump-start/jump-end should compute to start/end or vice versa (unsure which we prefer).
  • the computed value serialization should fall out from that
@birtles
Copy link
Contributor

birtles commented Apr 15, 2023

  • Should specified values of step-end and step-start be serialized as themselves rather than as a steps() function?

In general it's easier for authors if they don't need to write parsers for multiple potential outputs and can always assume a certain format.

That said, Chrome appears not to support that: https://wpt.fyi/results/css/css-easing/step-timing-functions-syntax.html?label=experimental&label=master&aligned

  • Should the jump-end and end keywords be kept as distinct specified values?

Yes. We'd like to normalize to jump-end but in the interests of Web compat, we shouldn't unless we have data to indicate it's safe to do so.

the serializations of the “end” values are collapsed to a single serialization, but not the “start” values.

That's intentional. We'd like to use jump-* values everywhere but we can't because of Web compat. The only case where we can is end / jump-end because it happens to be the default value so, according to standard CSS serialization rules, we omit it.

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