Skip to content

Commit 5feadbd

Browse files
committed
Split calc() into subsections.
1 parent 2bb13df commit 5feadbd

2 files changed

Lines changed: 55 additions & 26 deletions

File tree

css3-values/Overview.html

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,16 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
284284
<ul class=toc>
285285
<li><a href="#calc"><span class=secno>8.1. </span> Mathematical
286286
Expressions: &lsquo;<code class=css>calc()</code>&rsquo;</a>
287+
<ul class=toc>
288+
<li><a href="#calc-syntax"><span class=secno>8.1.1. </span> Syntax</a>
289+
290+
291+
<li><a href="#calc-type-checking"><span class=secno>8.1.2. </span>
292+
Type Checking</a>
293+
294+
<li><a href="#calc-range"><span class=secno>8.1.3. </span> Range
295+
Checking</a>
296+
</ul>
287297

288298
<li><a href="#cycle"><span class=secno>8.2. </span> Cycling Values:
289299
&lsquo;<code class=css>cycle()</code>&rsquo;</a>
@@ -1408,6 +1418,15 @@ <h3 id=calc><span class=secno>8.1. </span> Mathematical Expressions:
14081418
</pre>
14091419
</div>
14101420

1421+
<p> Given the complexities of width and height calculations on table cells
1422+
and table elements, math expressions involving percentages for widths and
1423+
heights on table columns, table column groups, table rows, table row
1424+
groups, and table cells in both auto and fixed layout tables MAY be
1425+
treated as if &lsquo;<code class=property>auto</code>&rsquo; had been
1426+
specified.
1427+
1428+
<h4 id=calc-syntax><span class=secno>8.1.1. </span> Syntax</h4>
1429+
14111430
<p>The expression language of these functions is described by the grammar
14121431
and prose below.
14131432

@@ -1436,6 +1455,18 @@ <h3 id=calc><span class=secno>8.1. </span> Mathematical Expressions:
14361455
| STRING S* | IDENT S* | URI S* | hexcolor | function<ins> | math</ins>
14371456
;</pre>
14381457

1458+
<p> UAs must support &lsquo;<a href="#calc0"><code
1459+
class=css>calc()</code></a>&rsquo; expressions of at least 30 terms, where
1460+
each &lsquo;<a href="#number"><code class=css>number</code></a>&rsquo;,
1461+
&lsquo;<a href="#dimension"><code class=css>dimension</code></a>&rsquo;,
1462+
or &lsquo;<a href="#percentage"><code
1463+
class=css>percentage</code></a>&rsquo; is a term. If a &lsquo;<a
1464+
href="#calc0"><code class=css>calc()</code></a>&rsquo; expression contains
1465+
more than the supported number of terms, it must be treated as if it were
1466+
invalid.
1467+
1468+
<h4 id=calc-type-checking><span class=secno>8.1.2. </span> Type Checking</h4>
1469+
14391470
<p>A math expression has a <dfn id=resolved-type>resolved type</dfn>, which
14401471
is one of &lsquo;<code class=css>&lt;length></code>&rsquo;, &lsquo;<code
14411472
class=css>&lt;frequency></code>&rsquo;, &lsquo;<code
@@ -1485,6 +1516,8 @@ <h3 id=calc><span class=secno>8.1. </span> Mathematical Expressions:
14851516
to zero (as purely-numeric expressions can be evaluated without any
14861517
additional information at parse time).
14871518

1519+
<h4 id=calc-range><span class=secno>8.1.3. </span> Range Checking</h4>
1520+
14881521
<p>The value resulting from an expression must be clamped to the range
14891522
allowed in the target context.
14901523

@@ -1501,23 +1534,6 @@ <h3 id=calc><span class=secno>8.1. </span> Mathematical Expressions:
15011534
width: 0px;</pre>
15021535
</div>
15031536

1504-
<p>Given the complexities of width and height calculations on table cells
1505-
and table elements, math expressions involving percentages for widths and
1506-
heights on table columns, table column groups, table rows, table row
1507-
groups, and table cells in both auto and fixed layout tables MAY be
1508-
treated as if &lsquo;<code class=property>auto</code>&rsquo; had been
1509-
specified.
1510-
1511-
<p>UAs must support &lsquo;<a href="#calc0"><code
1512-
class=css>calc()</code></a>&rsquo; expressions of at least 30 terms, where
1513-
each &lsquo;<a href="#number"><code class=css>number</code></a>&rsquo;,
1514-
&lsquo;<a href="#dimension"><code class=css>dimension</code></a>&rsquo;,
1515-
or &lsquo;<a href="#percentage"><code
1516-
class=css>percentage</code></a>&rsquo; is a term. If a &lsquo;<a
1517-
href="#calc0"><code class=css>calc()</code></a>&rsquo; expression contains
1518-
more than the supported number of terms, it must be treated as if it were
1519-
invalid.
1520-
15211537
<h3 id=cycle><span class=secno>8.2. </span> Cycling Values: &lsquo;<a
15221538
href="#cycle-value"><code class=css>cycle()</code></a>&rsquo;</h3>
15231539

@@ -2228,7 +2244,7 @@ <h2 class=no-num id=index>Index</h2>
22282244
title="&lt;resolution>"><strong>6.4.</strong></a>
22292245

22302246
<li>resolved type, <a href="#resolved-type"
2231-
title="resolved type"><strong>8.1.</strong></a>
2247+
title="resolved type"><strong>8.1.2.</strong></a>
22322248

22332249
<li>s, <a href="#s" title=s><strong>6.2.</strong></a>
22342250

css3-values/Overview.src.html

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,15 @@ <h3 id="calc">
949949
</pre>
950950
</div>
951951

952+
<p>
953+
Given the complexities of width and height calculations on table cells and table elements,
954+
math expressions involving percentages for widths and heights on
955+
table columns, table column groups, table rows, table row groups, and table cells
956+
in both auto and fixed layout tables
957+
MAY be treated as if 'auto' had been specified.
958+
959+
<h4 id='calc-syntax'>
960+
Syntax</h4>
952961

953962
<p>The expression language of these functions is described by
954963
the grammar and prose below.
@@ -976,6 +985,15 @@ <h3 id="calc">
976985
| STRING S* | IDENT S* | URI S* | hexcolor | function<ins> | math</ins>
977986
;</pre>
978987

988+
<p>
989+
UAs must support ''calc()'' expressions of at least 30 terms,
990+
where each ''number'', ''dimension'', or ''percentage'' is a term.
991+
If a ''calc()'' expression contains more than the supported number of terms,
992+
it must be treated as if it were invalid.
993+
994+
<h4 id='calc-type-checking'>
995+
Type Checking</h4>
996+
979997
<p>A math expression has a <dfn>resolved type</dfn>, which is one of
980998
''&lt;length>'', ''&lt;frequency>'', ''&lt;angle>'', ''&lt;time>'', or
981999
''&lt;number>''. The <i>resolved type</i> must be valid for where the
@@ -1013,6 +1031,9 @@ <h3 id="calc">
10131031
(as purely-numeric expressions can be evaluated without any additional
10141032
information at parse time).</p>
10151033

1034+
<h4 id='calc-range'>
1035+
Range Checking</h4>
1036+
10161037
<p>The value resulting from an expression must be clamped to the
10171038
range allowed in the target context.
10181039

@@ -1028,14 +1049,6 @@ <h3 id="calc">
10281049
width: 0px;</pre>
10291050
</div>
10301051

1031-
<p>Given the complexities of width and height calculations on table cells
1032-
and table elements, math expressions involving percentages for widths and
1033-
heights on table columns, table column groups, table rows, table row groups,
1034-
and table cells in both auto and fixed layout tables MAY be treated as if
1035-
'auto' had been specified.</p>
1036-
1037-
<p>UAs must support ''calc()'' expressions of at least 30 terms, where each ''number'', ''dimension'', or ''percentage'' is a term. If a ''calc()'' expression contains more than the supported number of terms, it must be treated as if it were invalid.</p>
1038-
10391052
<h3 id="cycle">
10401053
Cycling Values: ''cycle()''</h3>
10411054

0 commit comments

Comments
 (0)