Skip to content

Commit 4ee8429

Browse files
committed
[css-color-4] Clarify serializing opacity values with calc. #10426
1 parent 3d13816 commit 4ee8429

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

css-color-4/Overview.bs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6763,14 +6763,35 @@ Serializing other colors</h3>
67636763

67646764
The serialized form of ''currentColor'' is the string "currentcolor".
67656765

6766+
<!-- Big Text: Opacity Serial
6767+
6768+
███▌ ████▌ ███▌ ███▌ ████ █████▌ █ ▐▌ ███▌ █████▌ ████▌ ████ ███▌ █▌
6769+
█▌ █▌ █▌ █▌ ▐█ ▐█ █▌ █▌ ▐▌ █▌ ▐▌ █ █▌ █▌ █▌ █▌ █▌ ▐▌ ▐█ ▐█ █▌
6770+
█▌ █▌ █▌ █▌ █▌ █▌ █▌ ▐▌ █▌ █ ▐▌ █▌ █▌ █▌ █▌ ▐▌ █▌ █▌ █▌
6771+
█▌ █▌ ████▌ █▌ █▌ █▌ ▐▌ █▌ ▐▌█ ███▌ ████ ████▌ ▐▌ █▌ █▌ █▌
6772+
█▌ █▌ █▌ █████▌ █▌ ▐▌ █▌ █▌ █▌ █▌ █▌▐█ ▐▌ █████▌ █▌
6773+
█▌ █▌ █▌ █▌ █▌ █▌ █▌ ▐▌ █▌ █▌ █▌ █▌ █▌ █▌ ▐█ ▐▌ █▌ █▌ █▌
6774+
███▌ █▌ █▌ █▌ ███▌ ████ █▌ █▌ ███▌ █████▌ █▌ █▌ ████ █▌ █▌ █████
6775+
-->
67666776

67676777
<h2 id='serializing-opacity-values'>
67686778
Serializing <<opacity-value>></h2>
67696779

67706780
This applies to the ''opacity'' property.
67716781

6772-
The specified given opacity value is serialized
6773-
as a <<number>>, not a <<percentage>>.
6782+
If the specified value for an opacity value
6783+
matches a literal <<percentage-token>>
6784+
(i.e. does not use ''calc()'')
6785+
it should be serialized as the equivalent
6786+
<<number>> (0% maps to 0, 100% maps to 1) value.
6787+
value.
6788+
Otherwise, the specified value
6789+
for an opacity value
6790+
should serialize using
6791+
the standard serialization for the grammar.
6792+
6793+
<!-- The specified given opacity value is serialized
6794+
as a <<number>>, not a <<percentage>>. -->
67746795

67756796
This <<number>> value is expressed in base ten,
67766797
with the "." character as decimal separator.

0 commit comments

Comments
 (0)