System Info
Not environment-specific. This issue concerns the behavior of the existing MTS API.
Details
The existing MTS API getComputedStyleByKey can read regular CSS properties, but it does not return the computed value for CSS custom properties (--*).
CSS custom properties should be readable through the same API. The returned value should reflect the computed value in the target element context, including inheritance and var() substitution.
Reproduce Steps
-
Define a CSS custom property on an element:
.target {
--seed-color-fg-brand: #3370ff;
}
-
Use the MTS API to read --seed-color-fg-brand with getComputedStyleByKey.
-
Observe that the API does not return #3370ff.
Expected Behavior
getComputedStyleByKey returns the computed value of the CSS custom property.
System Info
Not environment-specific. This issue concerns the behavior of the existing MTS API.
Details
The existing MTS API
getComputedStyleByKeycan read regular CSS properties, but it does not return the computed value for CSS custom properties (--*).CSS custom properties should be readable through the same API. The returned value should reflect the computed value in the target element context, including inheritance and
var()substitution.Reproduce Steps
Define a CSS custom property on an element:
Use the MTS API to read
--seed-color-fg-brandwithgetComputedStyleByKey.Observe that the API does not return
#3370ff.Expected Behavior
getComputedStyleByKeyreturns the computed value of the CSS custom property.