Skip to content

Commit 66a5b4b

Browse files
committed
[css-values-5][editorial] Fix example code to current syntax/rules.
1 parent 63bd6ae commit 66a5b4b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

css-values-5/Overview.bs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3695,13 +3695,13 @@ Resolving ''calc-size()''</h3>
36953695
Percentages in the [=calc-size basis=] resolve as normal
36963696
so you can always smoothly transition to <em>any</em> size,
36973697
regardless of its value or behavior.
3698-
For example, ''calc-size(100%, size)''
3698+
For example, ''calc-size(100%, size)''
36993699
is guaranteed to interpolate smoothly with ''calc-size(100%, 0px)'',
37003700
producing intermediate values like ''calc-size(100%, size * .5)''.
37013701
Without ''calc-size()'',
37023702
interpolation from ''100%'' to ''0px'' only works as expected
37033703
if the percentage is [=definite=];
3704-
otherwise, the intermediate values like ''calc(50%)''
3704+
otherwise, the intermediate values like ''calc(50%)''
37053705
might all [=behave as auto=]
37063706
and not change size at all.
37073707

@@ -3938,11 +3938,11 @@ Simplifying ''calc-size()''</h4>
39383938
generally gives <em>quadratic</em> interpolation behavior.
39393939

39403940
Instead, we substitute the basis arg into the calculation arg,
3941-
so you get ''calc-size(percentage, 100px * 2)''
3942-
and ''calc-size(percentage, (size * .5) - 20px)'',
3941+
so you get ''calc-size(any, 100px * 2)''
3942+
and ''calc-size(100%, (size * .5) - 20px)'',
39433943
and when interpolated,
39443944
at the halfway point you get
3945-
''calc-size(percentage, 100px * 2 * .5 + ((size * .5) - 20px) * .5)'',
3945+
''calc-size(100%, 100px * 2 * .5 + ((size * .5) - 20px) * .5)'',
39463946
which does indeed resolve to 115px, as expected.
39473947
Other points in the transition are similarly linear.
39483948
</details>

0 commit comments

Comments
 (0)