Skip to content

[css-typed-om] Canonical units in computed values #725

Closed

Description

@darrnshn

If I have an element with width: 1cm, then does its computed value reify to CSS.cm(1) (which serializes to pixels)? In CSSOM, we only need to deal with canonical units because serialization uses canonical units, but I think this doesn't apply to reified objects in Typed OM?

If this is the required behaviour, then AFAIK this is difficult to implement in Blink because we don't retain unit information in computed style. I don't know about the other browsers.

Activity

  1. tabatkins commented on Mar 5, 2018

    @tabatkins
    Member

    I have no particular opinion on this. I'm fine with saying that computed value process uses canonical units.

  2. upsuper commented on Mar 11, 2018

    @upsuper
    Member

    I don't think Gecko preserves unit information for computed value either, so I also agree that it's probably better to use canonical units there.

  3. added a commit that references this issue on Jul 28, 2025
    1124efb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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