There appears to be a gap around Typed OM reification of computed values for properties using 1–4 side patterns, such as:
- border-image-outset
- border-image-slice
- border-image-width
Consider:
document.body.attributeStyleMap.set("border-image-outset", new CSSUnitValue(0, "number"));
console.log(getComputedStyle(document.body).borderImageOutset);
console.log(document.body.computedStyleMap().get("border-image-outset"));
Current behavior (Chrome & Safari):
- CSSOM serialization:
getComputedStyle(...).borderImageOutset -> "0" or "auto"
- Typed OM:
computedStyleMap().get(...) -> CSSStyleValue {} (unsupported)
Current WPT coverage assumes these computed values are unsupported because the computed value conceptually expands to four values:
// Computed value is always four values, which are not supported in
// Typed OM level 1.
However, CSSOM serialization collapses equal computed sides to a shorter form, for example:
0 0 0 0 -> 0
1 2 1 2 -> 1 2
This raises the question whether Typed OM reification should follow:
- the conceptual computed value shape (always 4 values), or
- the canonical CSSOM serialization shape (collapsed representation)
Firefox's in-progress implementation will likely initially follow existing WPT coverage for compatibility (or relax WPT tests), but this behavior seems worth clarifying at the specification level.
Links:
There appears to be a gap around Typed OM reification of computed values for properties using 1–4 side patterns, such as:
Consider:
Current behavior (Chrome & Safari):
getComputedStyle(...).borderImageOutset->"0"or"auto"computedStyleMap().get(...)->CSSStyleValue {}(unsupported)Current WPT coverage assumes these computed values are unsupported because the computed value conceptually expands to four values:
However, CSSOM serialization collapses equal computed sides to a shorter form, for example:
This raises the question whether Typed OM reification should follow:
Firefox's in-progress implementation will likely initially follow existing WPT coverage for compatibility (or relax WPT tests), but this behavior seems worth clarifying at the specification level.
Links: