[cssom-1][css-values-4][css-cascade-5] When should calc() be maintained in specified value serialization? #8290
Labels
Closed as Question Answered
Used when the issue is more of a question than a problem, and it's been answered.
css-values-4
Current Work
I am trying to determine if there is there a universal rule for when
calc()
should be maintained when serializing specified values?For example, consider the following:
In both Safari and Firefox (I have not tested anything else so far), this logs "calc(100px)". (If you were to go and add the element to the DOM and query the computed style, you would get "100px"). So for this property / value at least, calc() seems to be maintained in the specified value serialization.
However, if you take:
this logs "rgb(100, 255, 255)", seemingly resolving the calc().
It's possible this is clearly defined somewhere, or perhaps it is up to each individual property and/or value to define, but I have been having trouble finding it.
https://drafts.csswg.org/cssom/#serialize-a-css-component-value makes mention of differentiating between specified and computed / resolved values (calling it out as an issue), but its not clear that CSSOM would be the right spec for defining rules for calc() (though perhaps it would).
(See https://bug-250325-attachments.webkit.org/attachment.cgi?id=464424 for a live testcase)
The text was updated successfully, but these errors were encountered: