Bug 250325 - Determine when calc() should be preserved for specified value serialization
Summary: Determine when calc() should be preserved for specified value serialization
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-09 09:21 PST by Sam Weinig
Modified: 2023-01-16 09:22 PST (History)
1 user (show)

See Also:


Attachments
Test (780 bytes, text/html)
2023-01-09 09:22 PST, Sam Weinig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2023-01-09 09:21:11 PST
Currently there is a lack of clarity on when we should be preserving calc() for specified values. For instance, we preserve it for `width` but not for `color`. This tracks getting an answer from the CSS WG on the issue and can be used to host test cases.
Comment 1 Sam Weinig 2023-01-09 09:22:29 PST
Created attachment 464424 [details]
Test
Comment 2 Sam Weinig 2023-01-09 09:23:29 PST
Filed https://github.com/w3c/csswg-drafts/issues/8290 to track the issue with the WG.
Comment 3 Sam Weinig 2023-01-09 12:47:33 PST
So the answer is we should always be preserving calc() in the specified values, and our behavior for colors in the test case is wrong.

In practice this means we should be really remove all of the "Raw" helpers in the CSS property parser and ensure we have mechanisms to preserve calc in the respective CSSValue types.
Comment 4 Radar WebKit Bug Importer 2023-01-16 09:22:15 PST
<rdar://problem/104301484>