Skip to content

Commit b0592a2

Browse files
committed
[css-values] Add <length-percentage>/etc.
1 parent 753b046 commit b0592a2

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

css-values/Overview.bs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,33 @@ Percentages: the <<percentage>> type</h3>
669669
or a value of the formatting context
670670
(e.g., the width of a <a>containing block</a>).
671671

672+
<h4 id='dimension-percentage'>
673+
Percentages Relative to Other Values</h4>
674+
675+
In some cases, <<percentage>>s are interpreted relative to a <a>dimension</a> or <<number>>,
676+
such as a <<length>>.
677+
When this happens, <<percentage>>s and <a>dimensions</a>/<<number>>s can combined in ''calc()'' expressions.
678+
679+
While such "relative" percentages are often indicated in prose,
680+
they can also be indicated with an explicit grammar term,
681+
one for each basic <a>dimension</a> type:
682+
683+
: <dfn>&lt;length-percentage></dfn>
684+
:: Equivalent to <code class=prod>[ <<length>> | <<percentage>> ]</code>,
685+
where the <<percentage>> will resolve to a <<length>>.
686+
: <dfn>&lt;frequency-percentage></dfn>
687+
:: Equivalent to <code class=prod>[ <<frequency>> | <<percentage>> ]</code>,
688+
where the <<percentage>> will resolve to a <<frequency>>.
689+
: <dfn>&lt;angle-percentage></dfn>
690+
:: Equivalent to <code class=prod>[ <<angle>> | <<percentage>> ]</code>,
691+
where the <<percentage>> will resolve to an <<angle>>.
692+
: <dfn>&lt;time-percentage></dfn>
693+
:: Equivalent to <code class=prod>[ <<time>> | <<percentage>> ]</code>,
694+
where the <<percentage>> will resolve to a <<time>>.
695+
: <dfn>&lt;number-percentage></dfn>
696+
:: Equivalent to <code class=prod>[ <<number>> | <<percentage>> ]</code>,
697+
where the <<percentage>> will resolve to a <<number>>.
698+
672699
<h3 id='dimensions'>
673700
Numbers with Units: <a>dimensions</a></h3>
674701

0 commit comments

Comments
 (0)