Skip to content

Commit

Permalink
[css-values] Reorder sections. No changes to prose.
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed Sep 24, 2018
1 parent 5ee9639 commit 2afd13a
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 84 deletions.
88 changes: 46 additions & 42 deletions css-values-3/Overview.bs
Expand Up @@ -720,6 +720,49 @@ Real Numbers: the <<number>> type</h3>
As with integers, the first character of a number may be immediately preceded by ''-'' or ''+''
to indicate the number's sign.

<h3 id='dimensions'>
Numbers with Units: <a>dimension</a> values</h3>

The general term <dfn export>dimension</dfn> refers to
a number with a unit attached to it;
and is denoted by <dfn>&lt;dimension></dfn>.

When written literally,
a <a>dimension</a> is a <a>number</a>
immediately followed by a unit identifier,
which is an <a>identifier</a>.
It corresponds to the <<dimension-token>> production
in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> [[!CSS3SYN]].
Like keywords, unit identifiers are <a>ASCII case-insensitive</a>.

CSS uses <<dimension>>s to specify
distances (<<length>>),
durations (<<time>>),
frequencies (<<frequency>>),
resolutions (<<resolution>>),
and other quantities.

<h4 id="compat">
Compatible Units</h4>

When <a href="https://www.w3.org/TR/cssom-1/#serializing-css-values">serializing</a> <a>computed values</a> [[!CSSOM]],
<dfn export local-lt=compatible>compatible units</dfn>
(those related by a static multiplicative factor,
like the 96:1 factor between ''px'' and ''in'',
or the the computed 'font-size' factor between ''em'' and ''px'')
are converted into a single <dfn export local-lt=canonical>canonical unit</dfn>.
Each group of compatible units defines which among them is the <a>canonical unit</a>
that will be used for serialization.

When serializing <a href="https://www.w3.org/TR/cssom-1/#resolved-values">resolved values</a>
that are <a>used values</a>,
all value types (percentages, numbers, keywords, etc.)
that represent lengths are considered <a>compatible</a> with lengths.
Likewise any future API that returns <a>used values</a>
must consider any values represent distances/durations/frequencies/etc.
as <a>compatible</a> with the relevant class of <a>dimensions</a>,
and canonicalize accordingly.

<!--
█████ ██
██ ██ ██
Expand Down Expand Up @@ -751,6 +794,9 @@ Percentages: the <<percentage>> type</h3>
(e.g., the width of a <a>containing block</a>),
or something else.

<h3 id="mixed-percentages">
Mixing Percentages and Dimensions</h3>

In cases where a <<percentage>> can represent the same quantity
as a <a>dimension</a> or <a>number</a> in the same <a>component value</a> position,
and can therefore be combined with them in a ''calc()'' expression,
Expand Down Expand Up @@ -791,48 +837,6 @@ Percentages: the <<percentage>> type</h3>
Note: Specifications should never alternate <<percentage>> in place of a dimension
in a grammar unless they are <a>compatible</a>.

<h3 id='dimensions'>
Numbers with Units: <a>dimensions</a></h3>

The general term <dfn export>dimension</dfn> refers to
a number with a unit attached to it;
and is denoted by <dfn>&lt;dimension></dfn>.

When written literally,
a <a>dimension</a> is a <a>number</a>
immediately followed by a unit identifier,
which is an <a>identifier</a>.
It corresponds to the <<dimension-token>> production
in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> [[!CSS3SYN]].
Like keywords, unit identifiers are <a>ASCII case-insensitive</a>.

CSS uses <<dimension>>s to specify
distances (<<length>>),
durations (<<time>>),
frequencies (<<frequency>>),
resolutions (<<resolution>>),
and other quantities.

<h3 id="compat">
Compatible Units</h3>

When <a href="https://www.w3.org/TR/cssom-1/#serializing-css-values">serializing</a> <a>computed values</a> [[!CSSOM]],
<dfn export local-lt=compatible>compatible units</dfn>
(those related by a static multiplicative factor,
like the 96:1 factor between ''px'' and ''in'',
or the the computed 'font-size' factor between ''em'' and ''px'')
are converted into a single <dfn export local-lt=canonical>canonical unit</dfn>.
Each group of compatible units defines which among them is the <a>canonical unit</a>
that will be used for serialization.

When serializing <a href="https://www.w3.org/TR/cssom-1/#resolved-values">resolved values</a>
that are <a>used values</a>,
all value types (percentages, numbers, keywords, etc.)
that represent lengths are considered <a>compatible</a> with lengths.
Likewise any future API that returns <a>used values</a>
must consider any values represent distances/durations/frequencies/etc.
as <a>compatible</a> with the relevant class of <a>dimensions</a>,
and canonicalize accordingly.

<!--
██ ████████ ██ ██ ██████ ████████ ██ ██
Expand Down
88 changes: 46 additions & 42 deletions css-values-4/Overview.bs
Expand Up @@ -719,6 +719,49 @@ Real Numbers: the <<number>> type</h3>
do not match <<zero>>;
only literal <<number-token>>s do.

<h3 id='dimensions'>
Numbers with Units: <a>dimension</a> values</h3>

The general term <dfn export>dimension</dfn> refers to
a number with a unit attached to it;
and is denoted by <dfn>&lt;dimension></dfn>.

When written literally,
a <a>dimension</a> is a <a>number</a>
immediately followed by a unit identifier,
which is an <a>identifier</a>.
It corresponds to the <<dimension-token>> production
in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> [[!CSS3SYN]].
Like keywords, unit identifiers are <a>ASCII case-insensitive</a>.

CSS uses <<dimension>>s to specify
distances (<<length>>),
durations (<<time>>),
frequencies (<<frequency>>),
resolutions (<<resolution>>),
and other quantities.

<h4 id="compat">
Compatible Units</h4>

When <a href="https://www.w3.org/TR/cssom-1/#serializing-css-values">serializing</a> <a>computed values</a> [[!CSSOM]],
<dfn export local-lt=compatible>compatible units</dfn>
(those related by a static multiplicative factor,
like the 96:1 factor between ''px'' and ''in'',
or the the computed 'font-size' factor between ''em'' and ''px'')
are converted into a single <dfn export local-lt=canonical>canonical unit</dfn>.
Each group of compatible units defines which among them is the <a>canonical unit</a>
that will be used for serialization.

When serializing <a href="https://www.w3.org/TR/cssom-1/#resolved-values">resolved values</a>
that are <a>used values</a>,
all value types (percentages, numbers, keywords, etc.)
that represent lengths are considered <a>compatible</a> with lengths.
Likewise any future API that returns <a>used values</a>
must consider any values represent distances/durations/frequencies/etc.
as <a>compatible</a> with the relevant class of <a>dimensions</a>,
and canonicalize accordingly.

<!--
█████ ██
██ ██ ██
Expand Down Expand Up @@ -750,6 +793,9 @@ Percentages: the <<percentage>> type</h3>
(e.g., the width of a <a>containing block</a>),
or something else.

<h3 id="mixed-percentages">
Mixing Percentages and Dimensions</h3>

In cases where a <<percentage>> can represent the same quantity
as a <a>dimension</a> in the same <a>component value</a> position,
and can therefore be combined with them in a ''calc()'' expression,
Expand Down Expand Up @@ -791,48 +837,6 @@ Percentages: the <<percentage>> type</h3>
A &lt;number-percentage> will never be added,
as <<number>> and <<percentage>> can't be combined in ''calc()''.

<h3 id='dimensions'>
Numbers with Units: <a>dimensions</a></h3>

The general term <dfn export>dimension</dfn> refers to
a number with a unit attached to it;
and is denoted by <dfn>&lt;dimension></dfn>.

When written literally,
a <a>dimension</a> is a <a>number</a>
immediately followed by a unit identifier,
which is an <a>identifier</a>.
It corresponds to the <<dimension-token>> production
in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> [[!CSS3SYN]].
Like keywords, unit identifiers are <a>ASCII case-insensitive</a>.

CSS uses <<dimension>>s to specify
distances (<<length>>),
durations (<<time>>),
frequencies (<<frequency>>),
resolutions (<<resolution>>),
and other quantities.

<h3 id="compat">
Compatible Units</h3>

When <a href="https://www.w3.org/TR/cssom-1/#serializing-css-values">serializing</a> <a>computed values</a> [[!CSSOM]],
<dfn export local-lt=compatible>compatible units</dfn>
(those related by a static multiplicative factor,
like the 96:1 factor between ''px'' and ''in'',
or the the computed 'font-size' factor between ''em'' and ''px'')
are converted into a single <dfn export local-lt=canonical>canonical unit</dfn>.
Each group of compatible units defines which among them is the <a>canonical unit</a>
that will be used for serialization.

When serializing <a href="https://www.w3.org/TR/cssom-1/#resolved-values">resolved values</a>
that are <a>used values</a>,
all value types (percentages, numbers, keywords, etc.)
that represent lengths are considered <a>compatible</a> with lengths.
Likewise any future API that returns <a>used values</a>
must consider any values represent distances/durations/frequencies/etc.
as <a>compatible</a> with the relevant class of <a>dimensions</a>,
and canonicalize accordingly.

<!--
██ ████████ ██ ██ ██████ ████████ ██ ██
Expand Down

0 comments on commit 2afd13a

Please sign in to comment.