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 color in ghost button is filled in wrong color when high contrast mode + dark theme #11557

Closed
2 tasks done
s-onuma opened this issue Jun 6, 2022 · 4 comments
Closed
2 tasks done
Labels
component: button package: react carbon-components-react severity: 3 https://ibm.biz/carbon-severity type: bug 🐛

Comments

@s-onuma
Copy link

s-onuma commented Jun 6, 2022

Package

carbon-components, carbon-components-react

Browser

Chrome

Package version

carbon-components v10.53.0, carbon-components-react v7.53.0

React version

v16.14.0

Description

In high contrast mode with dark theme (e.g. carbon-theme--g90), a ghost button with hasIconOnly is not filled in the correct color.

Expected:
Ghost button icon should be filled in the text color.
image

Actual:
Ghost button icon is filled in black while tertiary button is correctly filled in the text color.
image

It's because ghost button is overwritten by fill: ButtonText.

#10199 is relevant (or duplicate).

Reproduction/example

https://codesandbox.io/s/tearsheet-example-forked-hlzepj

Steps to reproduce

  1. Enable high contrast mode in your OS.
    I take macOS Monterey for example. Open System Preference and tick "Increase contrast" in Accessibility > Display.
    image

  2. Open the codesandbox example and set Gray 90 for the theme.

Code of Conduct

@tw15egan
Copy link
Collaborator

Just an FYI MacOS "Increase Contrast" isn't fully supported by browsers, thus the high contrast modes don't always apply properly. Do you still see this issue when using Windows High Contrast mode? In V11, there is an IconButton component that does not seem to have these same issues, are you able to update?

@tw15egan
Copy link
Collaborator

Updating to the latest versions of V10 seems to resolve this issue though: https://codesandbox.io/s/tearsheet-example-forked-ngc0l5?file=/src/Theme/ThemeDropdown.js

@tw15egan
Copy link
Collaborator

Closing as I'm unable to reproduce on the latest version of V10. The icon is showing as visible in MacOS "Increase Contrast" mode as well as Windows HCM in both light and dark themes.

Repository owner moved this from ⏱ Backlog to ✅ Done in Design System Sep 15, 2022
@s-onuma
Copy link
Author

s-onuma commented Sep 15, 2022

The latest V10 worked for me as well. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button package: react carbon-components-react severity: 3 https://ibm.biz/carbon-severity type: bug 🐛
Projects
Archived in project
Development

No branches or pull requests

4 participants