Skip to content

[css-transforms] inconsistency of computed value serialization (transform should be a resolved value special case property so getComputedStyle() returns matrix()) #4869

Closed
@george-steel

Description

@george-steel

For the transform property, the spec says that

Computed value: as specified, but with lengths made absolute
Value: none | <transform-list>
<transform-list> = <transform-function>+

and provides a procedure for serializing transform individual transform functions. This seems to imply that the computed value should be serialized as a list of functions. Furthermore, there are procedures such as interpolation which expect computed values to be lists of functions.

Later in the spec there is a section

Serialization of the computed value of <transform-list>

which gives a procedure specifying conversion to a matrix, an operation which does not round-trip (round-tripping is necessary for css transitions) and relies on the box size (not allowed for computed values). Although this makes sense for serializing the resolved value (which is returned by getComputedStyle()) specifying this happens to the computed value looks like a confusing typo to me.

This may be a historical oversight from before the difference between computed and resolved value (sometimes historically referred to as computed value serialization) was fully clarified. We should correct this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions