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

Icon bug: Using information--filled and closed icons together causes the info icon to render incorrectly #5568

Closed
2 of 3 tasks
davefp opened this issue Mar 7, 2020 · 4 comments · Fixed by #5937
Closed
2 of 3 tasks
Assignees

Comments

@davefp
Copy link

davefp commented Mar 7, 2020

What package(s) are you using?

  • carbon-components version 10.10.1
  • @carbon/icons version 10.9.1
  • carbon-components-react

Detailed description

We are using icons from @carbon/icons version 10.9.1 (latest at time of writing) in a vanilla js/css environment. We have carbon-components version 10.10.1.

We are inlining our SVGs straight from the package using the inline_svg gem.

When rendering an inline notification that has both the information--filled and closed icon in it, the styles of the two interact badly and produce the following:

Screen Shot 2020-03-07 at 10 09 07 AM

The info icon is a dark grey square.

Specifically, the style block embedded in the close icon specifies .cls-1{fill:#231f20;} while the style block in the info icon specifies .cls-1{fill:none;}. One is overriding the other leading to the transparent rectangle around the info icon to be filled grey.

I am able to reproduce this issue in FireFox 72 and Chrome 80

Steps to reproduce the issue

  1. Generate a page with information--filled and close icons inlined directly from the @carbon/icons package.
  2. Render the page in a browser.

Codesandbox demonstrating the issue: https://codesandbox.io/s/wizardly-bhabha-igb9x

Additional information

None

@tw15egan
Copy link
Collaborator

tw15egan commented Mar 9, 2020

@joshblack is there any way we can run SVGO on the raw svg assets? Seems like that would resolve this issue.

@joshblack
Copy link
Contributor

@tw15egan I definitely think we can 👍 We do process them with SVGO for the modules that get published but don't for the svg folder. It seems like a great thing we can add in though.

@tw15egan
Copy link
Collaborator

Related: #5226 (comment)

@davefp
Copy link
Author

davefp commented Mar 11, 2020

@joshblack @tw15egan That would be excellent, thanks for the responses.

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