-
Notifications
You must be signed in to change notification settings - Fork 22.9k
docs: Add reference for CSS value serialization, especially colors #41322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fixes mdn#32734 Adds a new guide explaining how CSS values especially colors are serialized when accessed via JavaScript APIs like getComputedStyle() and getPropertyValue().
Preview URLs Flaws (3)URL:
External URLs (2)URL:
(comment last updated: 2025-09-29 04:05:11) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of content is incomplete or duplicative. I suspect you are using AI to write this, which is fine in principle, but next time please disclose this because it's not the quality we are expecting for a ready-for-review PR. Also, you should document length serialization as well at least, since that's the other common use case.
files/en-us/web/api/css_object_model/serializing_css_values/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/css_object_model/serializing_css_values/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/css_object_model/serializing_css_values/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/css_object_model/serializing_css_values/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/css_object_model/serializing_css_values/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/css_object_model/serializing_css_values/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/css_object_model/serializing_css_values/index.md
Outdated
Show resolved
Hide resolved
Hi @Josh-Cena , Yes, I tried the Co-pilot version of Sonnet 3.5. I will keep it in mind to mentioned that in the PR, I was not sure, if we used Copilot need to raise as Draft PR or Ready to reviewPR. |
…dex.md Co-authored-by: Joshua Chen <[email protected]>
…ssab/content into css-value-serialization
Let me know if any changes need to be updated or any grammatical error . Happy to update it. Thanks for the review. |
Add reference for CSS value serialization, especially colors
Fixes #32734
Description
Adds a new guide explaining CSS value serialization through JavaScript APIs, with a focus on how color values (hsl(), hwb(), etc.) are serialized to rgb()/rgba() format when accessed via getComputedStyle() or getPropertyValue().
Motivation
This documentation helps developers understand why and how CSS values, especially colors, might return in different formats than they were written. This addresses a common source of confusion when working with CSS values through JavaScript APIs.
Additional details
References:
Related issues and pull requests
Fixes #32734 - Creates documentation for CSS value serialization, especially for colors