Skip to content

Commit

Permalink
[css-grid-1] Audit inner/outer sizes. #2655
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed Oct 10, 2018
1 parent 387aa8c commit 6521460
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions css-grid-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1426,8 +1426,11 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
<dd>
A non-negative length or percentage, as defined by CSS3 Values. [[!CSS3VAL]]

<<percentage>> values are relative to the <a>inline size</a> of the <a>grid container</a> in column <a>grid tracks</a>,
and the <a>block size</a> of the <a>grid container</a> in row <a>grid tracks</a>.
<<percentage>> values are relative to
the <a lt="inner size">inner</a> <a>inline size</a>
of the <a>grid container</a> in column <a>grid tracks</a>,
and the <a lt="inner size">inner</a> <a>block size</a>
of the <a>grid container</a> in row <a>grid tracks</a>.
If the size of the <a>grid container</a>
depends on the size of its tracks,
then the <<percentage>>
Expand Down Expand Up @@ -1665,7 +1668,8 @@ Repeat-to-fill: ''auto-fill'' and ''auto-fit'' repetitions</h5>
When <dfn value for="repeat()">auto-fill</dfn> is given as the repetition number,
if the <a>grid container</a> has a <a>definite</a> size or max size in the relevant axis,
then the number of repetitions is the largest possible positive integer
that does not cause the <a>grid</a> to overflow its <a>grid container</a>
that does not cause the <a>grid</a> to overflow
the <a>content box</a> of its <a>grid container</a>
(treating each track as its <a>max track sizing function</a> if that is <a>definite</a>
or as its minimum track sizing function otherwise,
and taking 'gap' into account);
Expand Down Expand Up @@ -3731,8 +3735,12 @@ Track Sizing Terminology</h3>
<dd>
Independently in each dimension, the <a>available grid space</a> is:

* If the <a>grid container's</a> size is definite, then use the size of the resulting content box.
* If the <a>grid container</a> is being sized under a <a>min-content constraint</a> or <a>max-content constraint</a> , then the <a>available grid space</a> is that constraint (and is indefinite).
* If the <a>grid container's</a> size is definite,
then use the size of its content box.
* If the <a>grid container</a> is being sized under
a <a>min-content constraint</a> or <a>max-content constraint</a>
then the <a>available grid space</a> is that constraint
(and is indefinite).

Note: ''auto'' sizes that indicate content-based sizing (e.g. the height of a block-level box in horizontal writing modes) are equivalent to ''max-content''.

Expand Down Expand Up @@ -4162,7 +4170,8 @@ Maximize Tracks</h3>

If this would cause the grid to be larger than the <a>grid container's</a> <a property lt=max-width>max-width/height</a>,
then redo this step,
treating the <a>available grid space</a> as equal to the <a>grid container's</a> content box size
treating the <a>available grid space</a> as equal to
the <a>grid container's</a> <a>inner size</a>
when it's sized to its <a property lt=max-width>max-width/height</a>.

<h3 id="algo-flex-tracks">
Expand Down Expand Up @@ -4208,7 +4217,10 @@ Expand Flexible Tracks</h3>
(or larger than the <a>grid container's</a> <a property lt=max-width>max-width/height</a>),
then redo this step,
treating the <a>free space</a> as definite
and the <a>available grid space</a> as equal to the <a>grid container's</a> content box size when it's sized to its <a property lt=min-width>min-width/height</a> (<a property lt=max-width>max-width/height</a>).
and the <a>available grid space</a> as equal to
the <a>grid container's</a> <a>inner size</a>
when it's sized to its <a property lt=min-width>min-width/height</a>
(<a property lt=max-width>max-width/height</a>).
</dl>

For each flexible track,
Expand Down

0 comments on commit 6521460

Please sign in to comment.