-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Maintenance: CSS flex guide: updates to guide 1 #34148
Conversation
Preview URLs
(comment last updated: 2024-06-14 19:56:16) |
@@ -6,17 +6,17 @@ page-type: guide | |||
|
|||
{{CSSRef}} | |||
|
|||
The flexible box layout module, usually referred to as flexbox, was designed as a one-dimensional layout model, and as a method that could offer space distribution between items in an interface and powerful alignment capabilities. This article gives an outline of the main features of flexbox, which we will be exploring in more detail in the rest of these guides. | |||
The [flexible box layout](/en-US/docs/Web/CSS/CSS_flexible_box_layout) module, usually referred to as flexbox, is a one-dimensional layout model,distributing space between items in an interface with powerful alignment capabilities. This article gives an outline of the main features of flexbox, which we will be exploring in more detail in the rest of these guides. |
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.
Typo, plus a suggestion for readability. I'm not sure about "space between items in an interface", maybe we can drop it? What do you think?
The [flexible box layout](/en-US/docs/Web/CSS/CSS_flexible_box_layout) module, usually referred to as flexbox, is a one-dimensional layout model,distributing space between items in an interface with powerful alignment capabilities. This article gives an outline of the main features of flexbox, which we will be exploring in more detail in the rest of these guides. | |
The [flexible box layout](/en-US/docs/Web/CSS/CSS_flexible_box_layout) module (usually referred to as flexbox) is a one-dimensional layout model for distributing space between items and includes numerous alignment capabilities. This article gives an outline of the main features of flexbox, which we will explore in more detail in the rest of these guides. |
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.
completely agree!
files/en-us/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.md
Outdated
Show resolved
Hide resolved
|
||
To cause wrapping behavior add the property {{cssxref("flex-wrap")}} with a value of `wrap`. Now, should your items be too large to all display in one line, they will wrap onto another line. The live sample below contains items that have been given a width, the total width of the items being too wide for the flex container. As `flex-wrap` is set to `wrap`, the items wrap. Set it to `nowrap`, which is also the initial value, and they will instead shrink to fit the container because they are using initial flexbox values that allows items to shrink. Using `nowrap` would cause an overflow if the items were not able to shrink, or could not shrink small enough to fit. | ||
To cause wrapping behavior add the property {{cssxref("flex-wrap")}} with a value of `wrap`. Now, if your items are too large to all display in one line, they will wrap onto another line. The live sample below contains items that have been given a `width`. The total width of the items is too wide for the flex container. As `flex-wrap` is set to `wrap`, the items wrap. Set it to `nowrap`, which is the initial value, and they will shrink to fit the container. They shrink because they are using initial flexbox values, including `flex-shrink: 1`, that allows items to shrink. Using `nowrap` would cause an overflow if the items were not able to shrink, or could not shrink small enough to fit. |
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.
To cause wrapping behavior add the property {{cssxref("flex-wrap")}} with a value of `wrap`. Now, if your items are too large to all display in one line, they will wrap onto another line. The live sample below contains items that have been given a `width`. The total width of the items is too wide for the flex container. As `flex-wrap` is set to `wrap`, the items wrap. Set it to `nowrap`, which is the initial value, and they will shrink to fit the container. They shrink because they are using initial flexbox values, including `flex-shrink: 1`, that allows items to shrink. Using `nowrap` would cause an overflow if the items were not able to shrink, or could not shrink small enough to fit. | |
To cause wrapping behavior add the property {{cssxref("flex-wrap")}} with a value of `wrap`. Now, if your items are too large to all display in one line, they will wrap onto another line. The live sample below contains items that have been given a `width`. The total width of the items is too wide for the flex container. As `flex-wrap` is set to `wrap`, the items wrap across multiple lines. If you set it to `nowrap`, which is the initial value, and they will shrink to fit the container. They shrink because they are using initial flexbox values, including `flex-shrink: 1`, that allows items to shrink. Using `nowrap` would cause an overflow if the items were not able to shrink, or could not shrink small enough to fit. |
Should we link "overflow" to something?
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.
Linked to the learn explanation of scroll overflow.
files/en-us/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/css/css_flexible_box_layout/basic_concepts_of_flexbox/index.md
Outdated
Show resolved
Hide resolved
Nice improvements, a couple of comments for you to have a look at 👀 |
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.
Looking good! Ready to merge when you are 🚢
Flexbox is not longer new, and there have been values and properties added since this guide was written. This update adds the missing values and properties, and just freshens up the guide.
addressed as part of CSS baseline / interop openwebdocs/project#189 - subcomponent openwebdocs/project#202