Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[css-sizing-4][css-grid-2] Rename ar unit to tr. #3225
  • Loading branch information
fantasai committed Oct 23, 2018
1 parent 3a15ccb commit 0a5491f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
23 changes: 16 additions & 7 deletions css-grid-2/Overview.bs
Expand Up @@ -693,14 +693,14 @@ Aspect-ratio&ndash;controlled Gutters</h2>

<pre class="propdef">
Name: align-content, justify-content
New values: [ <<aspect-ratio>> <<content-distribution>>? ]
New values: [ <<transfer-ratio>> <<content-distribution>>? ]
</pre>


<dl dfn-for="align-content,justify-content" dfn-type=value>
<dt><dfn>&lt;aspect-ratio></dfn>
<dt><dfn>&lt;transfer-ratio></dfn>
<dd>
A <a spec="css-values">dimension</a> with the unit ''ar'',
A <a spec="css-values">dimension</a> with the unit ''tr'',
representing a multiplier against the analogous quantity
in the other dimension.
If that quantity cannot be determined
Expand All @@ -711,7 +711,7 @@ Aspect-ratio&ndash;controlled Gutters</h2>
even when there is no free space left,
causing overflow.

Specifically, an 'align-content' value of ''1ar'' represents
Specifically, an 'align-content' value of ''1tr'' represents
the amount of space (which may be zero) allocated between two adjacent
<a>alignment subjects</a> (<a>grid tracks</a> / <a>flex lines</a> / <a spec="css-multicol">column boxes</a>)
by the 'justify-content' property.
Expand All @@ -720,7 +720,7 @@ Aspect-ratio&ndash;controlled Gutters</h2>
as for 'justify-content'.
The behavior of <<number>> values for 'justify-content' is analogous.

Note: The space allocated by ''align-content: 1ar'' will be zero
Note: The space allocated by ''align-content: 1tr'' will be zero
if 'justify-content' does not allocate space
between adjacent <a>alignment subjects</a>:
either due to not having a <<content-distribution>> value
Expand Down Expand Up @@ -750,7 +750,7 @@ Aspect-ratio&ndash;controlled Gutters</h2>
grid-template-columns: repeat(auto-fill, 15em);
gap: 1em;
justify-content: space-evenly;
align-content: 1ar space-between;
align-content: 1tr space-between;
}
</pre>

Expand All @@ -762,14 +762,23 @@ Aspect-ratio&ndash;controlled Gutters</h2>
grid-template-columns: repeat(auto-fill, 15em);
gap: 1em 1.618em;
justify-content: space-evenly;
align-content: 0.618ar space-between;
align-content: 0.618tr space-between;
}
</pre>
</div>

<h2 id="changes">
Changes</h2>

<h3 class="no-num" id="changes-20180904">
Changes since the
<a href="https://www.w3.org/TR/2018/WD-css-grid-2-20180804/">August 2018
CSS Grid Layout Level 2 Working Draft</a></h3>

<ul>
<li>Renamed ''ar'' unit to ''tr''.
</ul>

<h3 class="no-num" id="changes-20180628">
Changes since the
<a href="https://www.w3.org/TR/2018/WD-css-grid-2-20180628/">June 2018
Expand Down
14 changes: 7 additions & 7 deletions css-sizing-4/Overview.bs
Expand Up @@ -200,19 +200,19 @@ Aspect Ratio Limits Option A: the ''from-ratio''</h3>
</div>

<h3 id="ar-width-height">
Aspect Ratio Limits Option B: the ''ar'' unit</h3>
Aspect Ratio Limits Option B: the ''tr'' unit</h3>

<pre class="partial propdef">
Name: min-width, min-height, max-width, max-height
New Values: <<aspect-ratio>>
Computed value: ''ar'' dimension value
New Values: <<transfer-ratio>>
Computed value: ''tr'' dimension value
</pre>

The <dfn type=value for="min-width, min-height, max-width, max-height"><<aspect-ratio>></dfn> value,
which is a <a>dimension</a> with the unit ''ar'',
The <dfn type=value for="min-width, min-height, max-width, max-height"><<transfer-ratio>></dfn> value,
which is a <a>dimension</a> with the unit ''tr'',
specifies that the used value of the property
is calculated from the used size of the opposite dimension
multiplied by the ''ar'' value.
multiplied by the ''tr'' value.

ISSUE: Define a table of all the ways this creates conflicts and cycles and break them.

Expand All @@ -224,7 +224,7 @@ Aspect Ratio Limits Option B: the ''ar'' unit</h3>

<pre>
div {
min-height: 1ar;
min-height: 1tr;
}
</pre>

Expand Down

0 comments on commit 0a5491f

Please sign in to comment.