-
Notifications
You must be signed in to change notification settings - Fork 841
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
Fixing Amsterdam base line-heights #4229
Conversation
@@ -1,7 +1,23 @@ | |||
// Import base theme first, then override | |||
@import '../../../../global_styling/mixins/index'; |
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.
I don't think the mixin updates were trickling down to the components when using importing the index file. So this new structure ensures that it does.
@@ -44,7 +44,8 @@ $euiFontSizeXL: $euiFontSize * nth($euiTextScale, 2) !default; // 28px | |||
$euiFontSizeXXL: $euiFontSize * nth($euiTextScale, 1) !default; // 36px | |||
|
|||
// Line height | |||
$euiLineHeight: 1.5; | |||
$euiLineHeight: 1.5 !default; |
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 one may still cause some issue within components, but we'll have to evaluate on a component by component basis.
Preview documentation changes for this PR: https://eui.elastic.co/pr_4229/ |
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.
LGTM! 🎉
I looked at the code and tested it in Chrome, Safari, Firefox, and Edge. Couldn't find any issue.
Having calculated line-heights that don't align with our
8px
baseline grid, was causing lots of issues inside components. The effects of these changes, however, shouldn't affect EuiText only components using theeuiFontSize[size]()
mixins. It also shouldn't affect the current theme at all.This whimsical is how I evaluated the current line-heights and where we actually want to be with alignment to the baseline grid.
Some before/afters:
Checklist
[ ] Checked in mobile[ ] Props have proper autodocs[ ] Added documentation[ ] Checked Code Sandbox works for the any docs examples[ ] Added or updated jest tests[ ] Checked for breaking changes and labeled appropriately[ ] Checked for accessibility including keyboard-only and screenreader modes