-
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
fix(css): elaborate how gap percentage values behave #34018
Conversation
OnkarRuikar
commented
Jun 8, 2024
- fixes Interpretation of percentage values in grid-gap #24933
Preview URLs External URLs (1)URL:
(comment last updated: 2024-07-04 04:09:53) |
Co-authored-by: Brian Thomas Smith <brian@smith.berlin>
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 make dimensions 24px to make flex and grid look same.
It feels a little wonky to use 24px here instead of 20px as with the others. What do you think about this: https://codepen.io/bsmth/pen/mdYNyJb i.e.: body > div {
background-color: #ccc;
width: 200px;
height: 200px;
flex-flow: column;
}
#grid {
display: inline-grid;
gap: 12.5%;
}
#flex {
display: inline-flex;
gap: 12.5%;
}
#grid > div,
#flex > div {
background-color: coral;
width: 20px;
height: 20px;
} Or with four items and some even values <span>Grid</span>
<div id="grid">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<span>Flex</span>
<div id="flex">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div> body > div {
background-color: #ccc;
width: 200px;
height: 200px;
flex-flow: column;
}
#grid {
display: inline-grid;
gap: 20%;
}
#flex {
display: inline-flex;
gap: 20%;
}
#grid > div,
#flex > div {
background-color: coral;
width: 20px;
height: 20px;
} |
Yes, 20px is easy to explain. |
Looks better! |
Co-authored-by: Brian Thomas Smith <brian@smith.berlin>
I'm so sorry for dragging out this review... I've read through the description again and it can do with a reword because it's already describing percentage values. This branch has a suggested edit: https://github.com/OnkarRuikar/content/compare/css_gap...bsmth:content:css_gap_description?expand=1 Then the paras have these functions: ## Description
* what it is
* how it works / looks
* use in grid
* use in flex
* use in multi-col
* percentage values
* history I'm happy to merge after this! |
Yes, the text made sense when it was a separate section. Now in the description section, it looks repetitive. I've done the changes. |
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.
Looks super. Thanks for your patience, Onkar!