Skip to content
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

Merged
merged 6 commits into from
Nov 6, 2020
Merged

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Nov 5, 2020

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 the euiFontSize[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.

Screen Shot 2020-11-05 at 12 52 32 PM

Some before/afters:

image
image

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • [ ] Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • [ ] 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
  • A changelog entry exists and is marked appropriately

@cchaos cchaos requested a review from miukimiu November 5, 2020 18:17
@@ -1,7 +1,23 @@
// Import base theme first, then override
@import '../../../../global_styling/mixins/index';
Copy link
Contributor Author

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;
Copy link
Contributor Author

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.

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4229/

Copy link
Contributor

@miukimiu miukimiu left a 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.

@cchaos cchaos merged commit fca50a4 into elastic:master Nov 6, 2020
@cchaos cchaos deleted the ams/line-height branch November 6, 2020 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants