Skip to content

Commit 3f13b5d

Browse files
committed
[css-color-5] Move "no magic scaling" prose out of the example
1 parent ef08333 commit 3f13b5d

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

css-color-5/Overview.bs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -993,12 +993,14 @@ so it has meaningful values for the channels.</p>
993993
which determines how "colorful" the color is.)
994994
</div>
995995

996+
Beware when using components outside their normal position;
997+
when percentages are resolved to numbers,
998+
there is no "magic scaling"
999+
to account for the changed position
1000+
if those numbers are used in a different place.
1001+
9961002
<div class="example" id="ex-no-percentage-magic">
997-
<p>Beware when using components outside their normal position;
998-
when percentages are resolved,
999-
there is no "magic scaling"
1000-
to account for the changed position.
1001-
For example,</p>
1003+
<p>For example,</p>
10021004

10031005
<pre highlight=css>
10041006
color: color(from color(srgb 0 0 0 / 60%) srgb alpha 0.6 0.6 / 0.9);
@@ -1010,8 +1012,9 @@ so it has meaningful values for the channels.</p>
10101012
</p>
10111013

10121014
<p>However, in this second example, again the alpha resolves to 0.6,
1013-
giving a very different color due to the color component range in
1014-
legacy rgb() syntax:
1015+
giving a very different color due to the color component range
1016+
of 0 to 255 in
1017+
rgb() syntax:
10151018
</p>
10161019

10171020
<pre highlight=css>
@@ -1020,7 +1023,7 @@ so it has meaningful values for the channels.</p>
10201023

10211024
<p>which results in
10221025
<span class="swatch" style="--color: rgb(0.235% 60% 60% / 0.9)"></span> ''rgb(0.6 153 153 / 0.9)''
1023-
and not
1026+
and <em>not</em>
10241027
<span class="swatch" style="--color: rgb(153 153 153 / 0.9)"></span> ''rgb(153 153 153 / 0.9)''.
10251028
</p>
10261029

0 commit comments

Comments
 (0)