Bug 245276 - Update CSS Color parsing and serialization to match the current spec
Summary: Update CSS Color parsing and serialization to match the current spec
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: BrowserCompat, InRadar
: 245134 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-16 08:31 PDT by Sam Weinig
Modified: 2022-09-20 22:54 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2022-09-16 08:31:51 PDT
CSS Color 4 has made a few parsing and serialization changes we should match:

- lch/lab/oklch/oklab all now take percent or number for all the non-hue components (with some new normalization / scaling rules for the percents)
- lch/lab/oklch/oklab all now serialize using the numeric form for all non-hue components.

Since we now want to serialize using the numeric form, we can also use this opportunity to remove the extra multiplications and divisions by 100 for oklch/oklab that we had to keep lightness as a percent, and just always keep it in the numeric form.
Comment 1 Radar WebKit Bug Importer 2022-09-16 08:40:45 PDT
<rdar://problem/100028649>
Comment 2 Sam Weinig 2022-09-16 09:33:51 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4419
Comment 3 Tim Nguyen (:ntim) 2022-09-16 10:17:07 PDT
*** Bug 245134 has been marked as a duplicate of this bug. ***
Comment 4 EWS 2022-09-20 12:04:37 PDT
Committed 254688@main (8913e90d9b69): <https://commits.webkit.org/254688@main>

Reviewed commits have been landed. Closing PR #4419 and removing active labels.