diff --git a/css-values-4/Overview.bs b/css-values-4/Overview.bs index e575d5ce41f..47d5e153747 100644 --- a/css-values-4/Overview.bs +++ b/css-values-4/Overview.bs @@ -1153,7 +1153,7 @@ URL Processing Model 1. If |cssRuleOrDeclaration| is a [=CSS declaration block=] whose [=parent CSS rule=] is not null, set |cssRuleOrDeclaration| to |cssRuleOrDeclaration|'s [=parent CSS rule=]. - 1. If |cssRuleOrDeclaration| is a [=CSS rule=], set |sheet| to |cssRuleOrDeclaration|'s {{CSSRule/parentStyleSheet|parent style sheet}}. + 1. If |cssRuleOrDeclaration| is a [=CSS rule=], set |sheet| to |cssRuleOrDeclaration|'s {{CSSRule/parentStyleSheet|parent style sheet}}. 1. If |sheet| is not null: 1. If |sheet|'s stylesheet base URL is not null, @@ -4906,7 +4906,28 @@ Simplification (0 - value). 2. If |root|'s child is a Negate node, return the child's child. - 3. Return |root|. + 3. If |root|'s child is a Sum node: + + 1. Let |negated grandchildren| be an empty list + + 2. For each |grandchild| of the child's children: + + 1. If |grandchild| is a numeric value, + create an equivalent numeric value, + but with the value negated + (0 - value), + and append the result to |negated grandchildren|. + + 2. If |grandchild| is a Negate node + append |grandchild|'s child to |negated grandchildren| + + 3. Otherwise, + create a Negate node with |grandchild| as its child, + and append the result to |negated grandchildren| + + 3. Return a Sum node with |negated grandchildren| as its children + + 4. Return |root|. 7. If |root| is an Invert node: