Skip to content

[css-properties-values-api] Canonical units for computed values #826

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

Closed
andruud opened this issue Oct 18, 2018 · 1 comment
Closed

[css-properties-values-api] Canonical units for computed values #826

andruud opened this issue Oct 18, 2018 · 1 comment

Comments

@andruud
Copy link
Member

andruud commented Oct 18, 2018

The spec currently says:

For <custom-ident>, ident, <color>, <integer>, <angle>, <time>, <resolution> or "*" values, the computed value is as specified.

I think that's a little weird that e.g. 100ms becomes 0.1s for transition-duration, but for some reason stays 100ms for <time>-registered custom properties. (And similarly for the other types). I suggest:

  • For <angle>, <time>, <resolution>: let the computed value be the specified value converted to its canonical unit, with calc resolved.
  • For <integer>: resolve calc (i.e. same as <number>, <percentage>).
  • For <color>: behave like color property? (Not sure about this one).
@tabatkins
Copy link
Member

Agree.

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