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

[New docs] Fix EuiProvider's globalStyles breaking docusaurus styles #7822

Closed
tkajtoch opened this issue Jun 10, 2024 · 5 comments
Closed

[New docs] Fix EuiProvider's globalStyles breaking docusaurus styles #7822

tkajtoch opened this issue Jun 10, 2024 · 5 comments

Comments

@tkajtoch
Copy link
Member

tkajtoch commented Jun 10, 2024

Summary

EuiProvider's default global styles are overriding and breaking some docusaurus styles, making its typography unusable. We need to find a way how to balance these two either by fixing EuiProvider to allow disabling some of its global styles or making docusaurus styles specificity higher

Acceptance criteria

  • Docusaurus website should look as expected (e.g., not have a gray EUI page background) when EuiProvider is used
  • EUI default styling should stay as is; there should be no breaking changes related to this work
  • Docusaurus headings and typography should have their default styling
@mgadewoll
Copy link
Contributor

mgadewoll commented Jun 18, 2024

This PR updates the EUI EuiGlobalStyles to support using partial global styles. There will be an additional small PR to add the update to the EUI+ theme but any further EUI+ specific changes will be done in the design update tasks, e.g. for updating the typography in #7795

@cee-chen
Copy link
Member

cee-chen commented Jun 18, 2024

I'm generally not a huge fan of adding functionality to production components for the sake of non-production use-cases. Can I ask why we can't just disable EUI's global styles completely via <EuiProvider globalStyles={false} /> and then just manually import or copy/paste the styles we do want to Docusaurus? That would personally by my preference (putting logic/customization in the lower stakes repo).

@mgadewoll
Copy link
Contributor

The idea was to be able to reuse some of the things where needed by making this more flexible. But I can agree that:

  • it makes sense to setup things project independent (though the idea in EUI+ is to reuse as much as possible and the theme is opinionated)
  • the EUI+ usage would be a one-off so far and we don't fully know yet what exactly will be used and how down the line as we only just start implementing

I think we could work also with globalStyles={false} for now and see later in the process how useful the granular update of EuiGlobalStyles will be and decide then if we want to move forward with this? cc @tkajtoch

@cee-chen
Copy link
Member

The second bullet point is definitely my concern! I think I just also don't want to spend too much time reviewing/working on future-proof logic on source code when we don't have clear production usages in mind. Hope that makes sense!

@mgadewoll
Copy link
Contributor

I think this is not needed anymore, I will close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants