-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiFlexGroup] Switch gutter CSS from negative margins to gap #5575
Conversation
@snide helped provide some context that this will likely impact a decent amount of downstream consumers. Cross-posting here for visibility:
Where that concerns this PR:
Would love to get feedback on the upgrade approach that people think is most realistic:
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5575/ |
I love this! Options 3 and 4 are the safest answer. I think I'd prefer 3, but I'll go through the process of thinking about 4.
I think hooks with
In cases where there was no If we went invasive, I would suggest planning it as the start of the next minor, and going door to door to individual developers to explain this change. |
I'll provide my contrary 2 cents to Dave's, which is that I prefer option 4 (a new I'd then propose the following stages: 1. Now
gapSize: 'l',
gutterSize: 'none',
2. Update EUI internal components
3. CSS-in-JS conversion
// example:
gapSize = 'l' || 64 This gives consumers the customization they need in order to remove their margin overrides and more ideal. |
I know I mostly forgot about this PR while doing other things, but it looks like now might be a good time to re-raise it during the CSS-in-JS conversion. @cchaos just wanted to check back in on this - it looks like based on the checklist item in #5685 (comment) we might be converting EuiFlex to |
@constancecchen Yeah, that checklist item is more geared towards styles that aren't controlled by the consumer. If we do deprecate |
👋 Hey there. This PR hasn't had any activity for 90 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
Closing this PR in favor of #6270. We've put out a Kibana/Cloud-wide survey and all responses so far have been largely in favor of switching away from margins to |
Summary
The
gap
property in flexbox has been supported by all major browsers (and all supported Elastic browsers) as of April 2021. We should move away from it instead of making use of negative margins, both for simplicity and because negative margins can occasionally cause unexpected DOM or cross-browser side effects (For example: the 2nd Safari issue in this comment that occurs when using negative margins and horizontal scrolling, which is solved by switching togap
).Links:
QA
Checklist
- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples- [ ] Added or updated jest and cypress tests- [ ] Checked for accessibility including keyboard-only and screenreader modes