@@ -4189,11 +4189,47 @@ Simplification</h4>
4189
4189
3. If |root| is an [=operator node=]
4190
4190
that's not one of the [=calc-operator nodes=] ,
4191
4191
and all of its children are numeric values
4192
- with enough information to computed the operation |root| represents,
4192
+ with enough information to compute the operation |root| represents,
4193
4193
return the result of running |root|'s operation
4194
4194
using its children,
4195
4195
expressed in the result's [=canonical unit=] .
4196
4196
4197
+ <div class=note>
4198
+
4199
+ If a percentage is left at this point,
4200
+ it will <em> usually</em> block simplification of the node,
4201
+ since it needs to be resolved against another value
4202
+ using information not currently available.
4203
+ (Otherwise, it would have been converted to a different value in an earlier step.)
4204
+ This includes operations such as "min",
4205
+ since percentages might resolve against a negative basis,
4206
+ and thus end up with an opposite comparative relationship
4207
+ than the raw percentage value would seem to indicate.
4208
+
4209
+ However, "raw" percentages--
4210
+ ones which do not resolve against another value,
4211
+ such as in 'opacity' --
4212
+ might not block simplification.
4213
+ </div>
4214
+
4215
+
4216
+ 8. If |root| is a Min or Max node,
4217
+ attempt to <em> partially</em> simplify it:
4218
+
4219
+ 1. [=list/For each=] node |child| of |root|’s children:
4220
+
4221
+ If |child| is a numeric value
4222
+ with enough information to compare magnitudes with another child of the same unit
4223
+ (see note in previous step),
4224
+ and there are other children of |root|
4225
+ that are numeric values with the same unit,
4226
+ combine all such children
4227
+ with the appropriate operator per |root|,
4228
+ and replace |child| with the result,
4229
+ removing all other child nodes involved.
4230
+
4231
+ 2. Return |root|.
4232
+
4197
4233
4. If |root| is a Negate node:
4198
4234
4199
4235
1. If |root|'s child is a numeric value,
@@ -4267,23 +4303,6 @@ Simplification</h4>
4267
4303
4268
4304
5. Return |root|.
4269
4305
4270
- 8. If |root| is a Min or Max node:
4271
-
4272
- 1. [=list/For each=] node |child| of |root|’s children:
4273
-
4274
- If |child| is a numeric value
4275
- with a unit other than "percent",
4276
- and there are other children of |root|
4277
- that are numeric values with the same unit,
4278
- combine all such children
4279
- with the appropriate operator per |root|,
4280
- and replace |child| with the result,
4281
- removing all other child nodes involved.
4282
-
4283
- 2. If |root| now has only a single child,
4284
- return that child.
4285
- Otherwise, return |root|.
4286
-
4287
4306
</div>
4288
4307
4289
4308
<h3 id='calc-computed-value'>
0 commit comments