Skip to content

[css-typed-om-1] Should partial reification of list-valued properties be allowed? #13687

@janvarga

Description

@janvarga

It is not entirely clear how CSS Typed OM Level 1 intends list-valued properties to behave when only some iterations are representable.

Example:

const el = document.createElement("div");

el.style.transitionTimingFunction = "linear, ease";
console.log(el.attributeStyleMap.getAll("transition-timing-function"));
// [CSSKeywordValue("linear"), CSSKeywordValue("ease")]

el.style.transitionTimingFunction = "linear, step-start";
console.log(el.attributeStyleMap.getAll("transition-timing-function"));
// [CSSStyleValue]  (single property-tied unsupported value)

In the second case, step-start may be canonicalized to steps(1, start), which is not representable in Typed OM Level 1.

The spec text in §5.2 (“Unrepresentable Values”) says:

“When this is the case, the property is reified as a CSSStyleValue for a particular property...”

This suggests an all-or-nothing behavior at the property level.

However, list-valued properties are otherwise processed per-item (e.g. via getAll()), which makes it unclear whether partial reification should be allowed.

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