Skip to content

Commit

Permalink
[css-grid-1][editorial] Incorporate note about placement-before-sizin…
Browse files Browse the repository at this point in the history
…g into the grid layout algorithm steps.
  • Loading branch information
tabatkins committed Nov 3, 2023
1 parent 600c743 commit 454fb25
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
10 changes: 7 additions & 3 deletions css-grid-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3782,21 +3782,25 @@ Grid Layout Algorithm</h2>
and lays out the [=grid items=]
which have been [=grid item placement algorithm|placed=] into its [=grid areas=].

1. First, find the size of the [=grid container=],
1. Run the [=Grid Item Placement Algorithm=]
to resolve the placement of all [=grid items=]
in the [=grid=].

2. Find the size of the [=grid container=],
per [[#intrinsic-sizes]].

Note: During this phase,
cyclic <<percentage>>s in track sizes are treated as ''grid-template-columns/auto''.

2. Given the resulting [=grid container=] size,
3. Given the resulting [=grid container=] size,
run the [=Grid Sizing Algorithm=]
to size the [=grid=].

Note: During this phase,
<<percentage>>s in track sizes are resolved
against the [=grid container=] size.

3. Lay out the [=grid items=] into their respective containing blocks.
4. Lay out the [=grid items=] into their respective containing blocks.
Each [=grid area's=] width and height
are considered [=definite=] for this purpose.

Expand Down
15 changes: 8 additions & 7 deletions css-grid-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4334,21 +4334,26 @@ Grid Layout Algorithm</h2>
and lays out the [=grid items=]
which have been [=grid item placement algorithm|placed=] into its [=grid areas=].

1. First, find the size of the [=grid container=],
1. Run the [=Grid Item Placement Algorithm=]
to resolve the placement of all [=grid items=]
(including [=subgrids=] and their sub-items)
in the [=grid=].

2. Find the size of the [=grid container=],
per [[#intrinsic-sizes]].

Note: During this phase,
cyclic <<percentage>>s in track sizes are treated as ''grid-template-columns/auto''.

2. Given the resulting [=grid container=] size,
3. Given the resulting [=grid container=] size,
run the [=Grid Sizing Algorithm=]
to size the [=grid=].

Note: During this phase,
<<percentage>>s in track sizes are resolved
against the [=grid container=] size.

3. Lay out the [=grid items=] into their respective containing blocks.
4. Lay out the [=grid items=] into their respective containing blocks.
Each [=grid area's=] width and height
are considered [=definite=] for this purpose.

Expand All @@ -4358,10 +4363,6 @@ Grid Layout Algorithm</h2>
the size of a grid item which is stretched
is also considered definite.

Note: Placement of all [=grid items=],
including [=subgrids=] and their sub-items,
occurs before sizing.


<h3 id="algo-grid-sizing" dfn export>
Grid Sizing Algorithm</h3>
Expand Down

0 comments on commit 454fb25

Please sign in to comment.