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

[EuiGlobalStyles] Omit global and reset styles when using legacy theme #5473

Merged
merged 4 commits into from
Dec 15, 2021

Conversation

thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Dec 15, 2021

Summary

Makes EuiGlobalStyles theme-aware so that global and reset styles are not added when using the legacy theme.
Decided to do this in the component rather than in the docs because as we move forward, we'll need to account for future and custom themes potentially having different global styles. For now, we can simply use isLegacyTheme as the flag.

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked Code Sandbox works for any docs examples
  • Checked for breaking changes and labeled appropriately
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

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

@thompsongl thompsongl changed the title [EuiProvider] Omit global and reset styles when using legacy theme [EuiGlobalStyles] Omit global and reset styles when using legacy theme Dec 15, 2021
@thompsongl thompsongl requested a review from cchaos December 15, 2021 16:28
@kibanamachine
Copy link

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

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix. I checked in all the themes and browser 👍

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@cee-chen cee-chen 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 appreciate the extra code comment context!

Co-authored-by: Caroline Horn <[email protected]>
@thompsongl thompsongl enabled auto-merge (squash) December 15, 2021 17:21
@kibanamachine
Copy link

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

@thompsongl thompsongl merged commit 9338a53 into elastic:main Dec 15, 2021
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.

4 participants