-
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
CSS: justify-content maintenance updates #34502
Conversation
Preview URLs (comment last updated: 2024-07-18 04:16:33) |
|
||
{{EmbedLiveSample("Basic grid example", "100%", 220)}} | ||
|
||
Note that `justify-contents` aligns the columns and has no effect on the items or alignment in grid areas. Grid items, even those that overflow their grid cell, do not impact column justification. |
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.
Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Few nits. And need to change the safe
example.
|
||
### The safe keyword | ||
|
||
This example demonstrates the `safe` keyterm. The HTML and CSS is the same as in the above example, except for the `justify-content` values: |
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.
We can't use the same example for safe
and unsafe
. Safe and unsafe require item overflow.
We could use this demo: https://jsfiddle.net/51af3k9m/2/
} | ||
|
||
.container:last-of-type { | ||
justify-content: safe space-around; |
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.
This is a wrong value. From the syntax <overflow-position>? [ <content-position> | left | right ]
only safe (center|start|end|flex-start|flex-end|left|right)
values are valid.
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.
redid the example completely
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.
Few nits.
Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com>
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.
Let's complete the example.
Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com>
Looks good to me. |
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.
Nice work @estelle; just a few small suggestions for you to consider.
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Updated the
justify-content
property.Moved descriptive text into a description section.
added flex and grid-related content.
Added information about multi-line
Converted the example to a multi-line example to demonstrate the effect are per flex line.,
Also added a grid example demonstrating effect is on grid columns only, with no effect on grid items themselves.
P.S. was sick when i updated this content (and still am), so if it isn't well explained, please let me know so i can fix .