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

Bug - [Icon] - [Icon resets color to --pf-v5-c-icon__content--Color which is not always wanted] #9099

Closed
Tracked by #53
KKoukiou opened this issue May 10, 2023 · 1 comment

Comments

@KKoukiou
Copy link
Collaborator

Describe the problem
it's a use case (at least in cockpit) to define icon buttons. When these needed to be resized we need to use the Icon wrapper around the icon, since Patternfly 5 removed the size property on the different icons from react-icons.
When this is used the color is reset to black.

How do you reproduce the problem?

<Button variant="plain" aria-label="Action">
      <Icon size="xl"><TimesIcon /></Icon>
</Button>

Expected behavior
The Icon color should inherit the 'plain' button variant color.

Is this issue blocking you?
CSS workaround, setting color: inherit.

Screenshots
Problematic screenshot:
Screen Shot 2023-05-10 at 13 13 39

Expected:
Screen Shot 2023-05-10 at 13 13 56

What is your product and what release date are you targeting?
Cockpit

@mcoker
Copy link
Contributor

mcoker commented May 16, 2023

Hey @KKoukiou! This should be fixed now via patternfly/patternfly#5525. I updated the icon component to inherit color and font-size by default - though you could do that before using the isInline prop, it's the default behavior now. https://codesandbox.io/s/cocky-leaf-d3y4ti?file=/index.tsx

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

No branches or pull requests

2 participants