Skip to content

Clarify grid-auto-flow column placement tracks#44355

Open
KirtiRamchandani wants to merge 1 commit into
mdn:mainfrom
KirtiRamchandani:docs/grid-auto-flow-column-example
Open

Clarify grid-auto-flow column placement tracks#44355
KirtiRamchandani wants to merge 1 commit into
mdn:mainfrom
KirtiRamchandani:docs/grid-auto-flow-column-example

Conversation

@KirtiRamchandani

Copy link
Copy Markdown
Contributor

Summary

  • clarify how the grid-auto-flow: column example uses row tracks before adding columns
  • point readers to grid-auto-columns for sizing implicit columns

Rationale

The issue report describes confusion when only column tracks are defined: column auto-placement creates additional implicit columns instead of wrapping items into the existing explicit columns. The note explains why the example defines rows and how implicit columns are sized.

Tests

  • git diff --check
  • npx --yes prettier@3.8.3 --check files/en-us/web/css/reference/properties/grid-auto-flow/index.md
  • npx --yes --package markdownlint-cli2@0.22.1 --package markdownlint-rule-search-replace@1.2.0 markdownlint-cli2 --config .markdownlint-cli2.jsonc files/en-us/web/css/reference/properties/grid-auto-flow/index.md

Fixes #44282

@KirtiRamchandani KirtiRamchandani requested a review from a team as a code owner June 4, 2026 13:49
@KirtiRamchandani KirtiRamchandani requested review from pepelsbey and removed request for a team June 4, 2026 13:49
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels Jun 4, 2026

@pepelsbey pepelsbey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you 🙂

Though explanation usually goes before the rendered example.

Comment on lines 189 to +194
{{EmbedLiveSample("Setting_grid_auto-placement", "200px", "260px")}}

In this example, `grid-template` defines four row tracks and two column tracks.
When `grid-auto-flow` is set to `column`, auto-placed items fill each column by filling the rows in turn, then add new columns as needed.
If your grid defines only column tracks, `column` auto-placement creates additional implicit columns instead of wrapping items into the existing columns, and those implicit columns are sized by [`grid-auto-columns`](/en-US/docs/Web/CSS/Reference/Properties/grid-auto-columns).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{EmbedLiveSample("Setting_grid_auto-placement", "200px", "260px")}}
In this example, `grid-template` defines four row tracks and two column tracks.
When `grid-auto-flow` is set to `column`, auto-placed items fill each column by filling the rows in turn, then add new columns as needed.
If your grid defines only column tracks, `column` auto-placement creates additional implicit columns instead of wrapping items into the existing columns, and those implicit columns are sized by [`grid-auto-columns`](/en-US/docs/Web/CSS/Reference/Properties/grid-auto-columns).
In this example, `grid-template` defines four row tracks and two column tracks.
When `grid-auto-flow` is set to `column`, auto-placed items fill each column top-to-bottom, then add new columns as needed.
If your grid defines only column tracks, `column` auto-placement creates additional implicit columns instead of wrapping items into the existing columns, and those implicit columns are sized by {{cssxref("grid-auto-columns")}}.
{{EmbedLiveSample("Setting_grid_auto-placement", "200px", "260px")}}

@pepelsbey

Copy link
Copy Markdown
Member

@SkepticaLee does it fix the issue?

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

grid-auto-flow: column;

3 participants