Skip to content

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

Closed
@andruud

Description

@andruud

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions