Skip to content

Commit

Permalink
[css-values-5] Clarifications to *progress() interpretation and validity
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed Nov 2, 2024
1 parent aa296cb commit 08ebea0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions css-values-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ Calculated Progress Values: the ''progress()'' notation</h3>
but must have a [=consistent type=]
or else the function is invalid.

The result will be a <<number>>,
The value of ''progress()'' is a <<number>>,
determined by [=calculating a progress function=],
then [=made consistent=] with the [=consistent type=] of its arguments.

Expand Down Expand Up @@ -863,11 +863,12 @@ Media Query Progress Values: the ''media-progress()'' notation</h3>
must be valid values for the specified [=media query=],
and both [=calculation=] values must have a [=consistent type=],
or else the function is invalid.
Units in the [=progress start value=] and [=progress end value=]

The [=progress start value=] and [=progress end value=] [=calculations=]
are interpreted as specified for the [=media feature=]
(rather than as specified by the context the function is used in).

The result will be a <<number>>,
The value of ''media-progress()'' is a <<number>>,
determined by [=calculating a progress function=].

Note: ''media-progress()'' is <em>not</em> a [=math function=];
Expand Down Expand Up @@ -901,17 +902,19 @@ Container Query Progress Values: the ''container-progress()'' notation</h3>
must be valid values for that [=size feature=],
and both [=calculation=] values must have a [=consistent type=],
or else the function is invalid.
Units in the [=progress start value=] and [=progress end value=]
''container-progress()'' is only valid in a property value context;
it cannot be used in, for example, a [=media query=].

The [=progress start value=] and [=progress end value=] [=calculations=]
are interpreted as specified for the [=size feature=]
(rather than as specified by the context the function is used in).

The result will be a <<number>>,
determined by [=calculating a progress function=].

If no appropriate containers are found,
''container-progress()'' resolves its <<size-feature>> query
against the [=small viewport size=].

The value of ''media-progress()'' is a <<number>>,
determined by [=calculating a progress function=].

Note: ''container-progress()'' is <em>not</em> a [=math function=];
it's just a function that evaluates to a <<number>>.

Expand Down

0 comments on commit 08ebea0

Please sign in to comment.