-
Notifications
You must be signed in to change notification settings - Fork 22.7k
Fix: Clarified misleading statements in Grid Layout page (#39875) #39904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -316,7 +316,7 @@ When creating our example grid, we specifically defined our column tracks with t | |||
The _explicit grid_ consists of rows and columns defined with {{cssxref("grid-template-columns")}} or {{cssxref("grid-template-rows")}}. The | |||
_implicit grid_ extends the defined explicit grid when content is placed outside of that grid, such as into the rows by drawing additional grid lines. | |||
|
|||
If you place something outside of the defined grid—or due to the amount of content, more grid tracks are needed—then the grid creates rows and columns in the _implicit grid_. These tracks will be auto-sized by default, resulting in their size being based on the content that is inside them. | |||
If you place something outside of the defined grid—or due to the amount of content, more grid tracks are needed—then the grid creates rows and columns in the _implicit grid_. These tracks will be auto-sized by default, meaning their size is influenced both by the content inside them and by the available free space within the grid container. The "auto" keyword allows the track to accommodate content while also sharing any remaining space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be explicit about where the auto
keyword is added (use backtick (`), not quotes (") for demarking keywords)
here is my suggestion for the rest:
If you place something outside of the defined grid—or due to the amount of content, more grid tracks are needed—then the grid creates rows and columns in the _implicit grid_. These tracks will be auto-sized by default, meaning their size is influenced both by the content inside them and by the available free space within the grid container. The "auto" keyword allows the track to accommodate content while also sharing any remaining space. | |
If you place something outside of the defined grid or, due to the amount of content, more grid tracks are needed, then the grid creates rows and columns in the _implicit grid_. These tracks will be auto-sized by default, meaning their size is influenced both by the content that is inside them and by the available free space within the grid container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @estelle 👋,
I have applied the suggested changes as per your feedback. Please have a look when convenient. Thank you! 🚀
…2106/content into fix-grid-statement-39875
@@ -316,7 +316,7 @@ When creating our example grid, we specifically defined our column tracks with t | |||
The _explicit grid_ consists of rows and columns defined with {{cssxref("grid-template-columns")}} or {{cssxref("grid-template-rows")}}. The | |||
_implicit grid_ extends the defined explicit grid when content is placed outside of that grid, such as into the rows by drawing additional grid lines. | |||
|
|||
If you place something outside of the defined grid—or due to the amount of content, more grid tracks are needed—then the grid creates rows and columns in the _implicit grid_. These tracks will be auto-sized by default, resulting in their size being based on the content that is inside them. | |||
If you place something outside of the defined grid or due to the amount of content, more grid tracks are needed, then the grid creates rows and columns in the _implicit grid_. These tracks will be auto-sized by default, meaning their size is influenced both by the content that is inside them and by the available free space within the grid container. The `auto` keyword allows the track to accommodate content while also sharing any remaining space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which property/ies is this auto
referencing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this context, the auto
keyword refers to the track sizing function used in properties like grid-template-columns
, grid-template-rows
, grid-auto-columns
, and grid-auto-rows
. Specifically, when implicit grid tracks are created (for example, via grid-auto-rows
), their default sizing is auto
, meaning the track size depends on its content (similar to max-content
) and can expand to fit the content within available space.
Fixes #39875
Summary of changes:
auto
works as the maximum value — it allows the track to grow based on content up to its max-content size while sharing free space within the grid container.These changes follow the suggestions from the issue reporter and improve the accuracy of documentation for CSS Grid behavior.
This is my first contribution to
mdn/content
— happy to assist further if needed 🚀.