-
Notifications
You must be signed in to change notification settings - Fork 23k
Refine CSS Value Processing document #40546
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
Conversation
Signed-off-by: saku <[email protected]>
Josh-Cena
left a comment
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.
Drive-by, just looking at Markdown correctness. Not interested in reviewing, although this looks like good work; thank you!
|
Thanks for the quick review! Fixed in: correct anchor links |
| Every CSS property's value comes from the declaration that wins the [cascade](/en-US/docs/Web/CSS/CSS_cascade/Cascade) algorithm. When multiple declarations provide different property values for the same element, the declaration that ranks highest in the [cascade sorting order](/en-US/docs/Web/CSS/CSS_cascade/Cascade#cascading_order) gets applied. | ||
|
|
||
| Each property value comes from a single property-value pair; is single value is applied from each property. Even if the value is a comma separated list of values, that list of values came from a single declaration. | ||
| Each property value comes from a single property name-value pair; a single value is applied from each property. Even if the value is a comma separated list of values, that list of values came from a single declaration. |
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.
property = name + value
| ## Property values | ||
|
|
||
| Every CSS property's value comes from the declaration with the greatest {{cssxref("specificity")}}. If two or more declarations with the same specificity provide different property values for the same element, the declaration value whose selector has the greatest algorithmic weight gets applied. | ||
| Every CSS property's value comes from the declaration that wins the [cascade](/en-US/docs/Web/CSS/CSS_cascade/Cascade) algorithm. When multiple declarations provide different property values for the same element, the declaration that ranks highest in the [cascade sorting order](/en-US/docs/Web/CSS/CSS_cascade/Cascade#cascading_order) gets applied. |
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.
It could be read like property value comes because of only from the resolution of the specificity algorithm, but it's actually not.
| - [Declared value](#declared_value) | ||
| - [Cascaded value](#cascaded_value) | ||
| - [Specified value](#specified_value) | ||
| - [Computed value](#computed_value) | ||
| - [Used value](#used_value) |
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.
The terminology "Initial value" is used IN the resolution phase of specified value, that is Defaulting phase - it's not the term to describe the part of value processing flow.
https://www.w3.org/TR/css-cascade-4/#value-stages
https://www.w3.org/TR/css-cascade-4/#defaulting
|
Preview URLs Flaws (5)URL:
URL:
External URLs (1)URL:
(comment last updated: 2025-08-28 12:20:15) |
|
I would love a review from you, if that's possible! |
estelle
left a comment
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.
This PR is excellent. I only got through the first bit, so have more to review, but I am heading out in 20 minutes for the week so I wanted to commit what I have instead of leaving you waiting.
I realize from the number of comments in just the first portion of this it seems like i may be being critical. I am just trying to ensure that the level is such that people with less knowledge than us aren't confused. So please don't take the number of edits as a reflection of the work you did. It's excellent. I am just making suggestions that I hope will answer the readers questions before they ask them.
Co-authored-by: Estelle Weyl <[email protected]>
Co-authored-by: Estelle Weyl <[email protected]>
Co-authored-by: Estelle Weyl <[email protected]>
Co-authored-by: Estelle Weyl <[email protected]>
|
Thank you so much for taking the time to review this, @estelle! I really appreciate your thoughtful feedback, especially knowing how busy you are. Enjoy your time off! |
estelle
left a comment
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 few more suggestions and questions
Co-authored-by: Estelle Weyl <[email protected]>
Co-authored-by: Estelle Weyl <[email protected]>
|
Thank you very much for spending time, @estelle ! I made changes of: I hope they make sense! |
estelle
left a comment
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.
Thank you!
estelle
left a comment
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.
Thank you!
Yay. That was quite the first content PR. Welcome to the team!
Description
The change mainly aims for better accuracy to describe CSS value processing flow according to the specification.
Motivation
The previous version sometimes used incorrect terminology and descriptions, which will ultimately lead differences between mdn and the specs.
e.g.
(which are Filtering, Cascading, and related terms) are necessary to make after-Defaulting values understandable. Omitting the before-Defaulting process essentially leads to misworded descriptions.
The change also includes some typo/wording updates, which will make the description more accurate or simpler.
Additional details
The changes ensure compliance with:
Related issues and pull requests