Closed Bug 1862928 Opened 2 years ago Closed 2 years ago

[css-color] Add function that serialize a color to a value that an author would enter

Categories

(Core :: CSS Parsing and Computation, task)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: tlouw, Assigned: tlouw)

References

Details

Attachments

(2 files)

Right now AbsoluteColor::to_css(...) serializes to a computed value. Computed values have rules like serializing hsl/hwb to rgb, etc. For displaying color in the user interface, we want specified values (values entered by authors).

Moving code to a separate file to allow adding more logic to it in the
next commit.

Assignee: nobody → tlouw
Status: NEW → ASSIGNED

This function allows writing colors as specified values so that it can
be used in the frontend and diplayed to users.

Mostly this avoid serializing hsl/hwb to rgb format like it does for
computed values.

Depends on D192672

Attachment #9361797 - Attachment description: Bug 1862928 - Part 2 - Add function to serialize colors as specified values. r=#layout → Bug 1862928 - Part 2 - Add function to serialize colors as authored values. r=#layout
Summary: [css-color] Add function that serialize a color to specified value. → [css-color] Add function that serialize a color to a value that an author would enter
Attachment #9361796 - Attachment description: Bug 1862928 - Part 1 - Move color serialization code to separate file. r=#layout → WIP: Bug 1862928 - Part 1 - Move color serialization code to separate file. r=#layout
Attachment #9361797 - Attachment description: Bug 1862928 - Part 2 - Add function to serialize colors as authored values. r=#layout → WIP: Bug 1862928 - Part 2 - Add function to serialize colors as authored values. r=#layout
Attachment #9361796 - Attachment description: WIP: Bug 1862928 - Part 1 - Move color serialization code to separate file. r=#layout → Bug 1862928 - Part 1 - Move color serialization code to separate file. r=#layout
Attachment #9361797 - Attachment description: WIP: Bug 1862928 - Part 2 - Add function to serialize colors as authored values. r=#layout → Bug 1862928 - Part 2 - Add function to serialize colors as authored values. r=#layout
Pushed by tlouw@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2573ca978c7f Part 1 - Move color serialization code to separate file. r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/390f21d9c943 Part 2 - Add function to serialize colors as authored values. r=layout-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: