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

RCPCH Chart - Global styles are not encapsulated to component - v7.0.12 #109

Open
dmc-cambric opened this issue Sep 23, 2024 · 1 comment

Comments

@dmc-cambric
Copy link
Contributor

Hi Team,

Got another small issue with the font import changes. When the RCPCHChart component is rendered on the screen, its font is applied to other elements in our web app outside of the RCPCH component.

I think the source of the issue is the createGlobalStyle function from styled-components, I believe that when RCPCHChart component is mounted, the font styles applied to the header and body tags are applied globally to the DOM, and thus across our app.

Could these styles be changed instead to apply to tags within a wrapper div element so there's no overlap when using the component?

createGlobalStyle func:

In app example:
image

@mbarton
Copy link
Member

mbarton commented Oct 16, 2024

Thanks for the report and sorry for the delayed acknowledgement @dmc-cambric - we are working on this

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

No branches or pull requests

2 participants