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

Fix EuiCodeBlock padding for scrollbar #2727

Merged
merged 4 commits into from
Jan 2, 2020

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Jan 2, 2020

Fixes a regression that was introduced when adjusting the position of the EuiCodeBlock control buttons

Before
Screen Shot 2020-01-02 at 15 09 50 PM

After
Screen Shot 2020-01-02 at 15 12 12 PM

Checklist

  • [ ] Check against all themes for compatability in both light and dark modes
  • Checked in mobile
  • Checked in IE11 and Firefox
  • [ ] Props have proper autodocs
  • [ ] Added documentation 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 snide January 2, 2020 20:13
@cchaos cchaos force-pushed the code_block_padding branch from 40ac201 to 5359411 Compare January 2, 2020 20:13
Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked code and tested a couple scenarios. I think all of these are scaling appropriately based upon the paddings.

image

image

image

@@ -64,6 +60,8 @@
font-size: $euiFontSize;
}

$controlsPadding: $euiSizeL + $euiSizeXS;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe put this higher in the document if you don't want to make a vars file?

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 not only didn't want to make a vars file but it really isn't necessary to be global (accessible outside of this selector). I'll just add a comment above it so that it stands out while moving through the nested selectors.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Whenever I see a var I don't recognize I normally go through this order in assumptions of where it might is.

  1. /component/_variables.scss
  2. Top of .euiComponent, scoped within that component.

Just felt a little lonely there in the middle.

@cchaos cchaos merged commit 3768e48 into elastic:master Jan 2, 2020
@cchaos cchaos deleted the code_block_padding branch January 2, 2020 21:02
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.

2 participants