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

[ClickableTile]: All text looks like link if a real href is used. #8158

Closed
2 tasks done
abbeyhrt opened this issue Mar 22, 2021 · 5 comments · Fixed by #8159
Closed
2 tasks done

[ClickableTile]: All text looks like link if a real href is used. #8158

abbeyhrt opened this issue Mar 22, 2021 · 5 comments · Fixed by #8159

Comments

@abbeyhrt
Copy link
Contributor

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you're having.

In ClickableTile if a real href is specified, then all of the text becomes blue and looks like a link. This might be intended but isn't by default what shows up with the empty href in the storybook so I wanted to clarify.

This doesn't look so bad in the storybook because it's just two words but real use cases have more content in the tiles and it looks a bit odd if it all looks like a link.

Steps to reproduce the issue

  1. Go to https://carbon-components-react.netlify.app/?path=/story/components-tile--clickable
  2. Change the href to a real link, say https://www.google.com/
  3. See that Clickable Tile looks like a link

Also can see this in the sandbox below.

Please create a reduced test case in CodeSandbox
https://codesandbox.io/s/intelligent-platform-ji1xi?file=/src/index.js

@emyarod
Copy link
Member

emyarod commented Mar 22, 2021

it looks like your code sandbox example is also showing dark gray text?

image

edited to include URL and dev tools

image

image

@abbeyhrt
Copy link
Contributor Author

Screen Shot 2021-03-22 at 3 03 20 PM
Maybe I'm going crazy but this is what I see

@abbeyhrt
Copy link
Contributor Author

Could it be browser specific? I'm using chrome, if it helps.

@tw15egan
Copy link
Collaborator

tw15egan commented Mar 22, 2021

Screen Shot 2021-03-22 at 1 03 28 PM

I see the same, Chrome isn't computing the styles properly:

Screen Shot 2021-03-22 at 1 03 47 PM

Since this doesn't need anything from the Link component, I think we just need to render an a instead of Link since we override all the styles anyways

@emyarod
Copy link
Member

emyarod commented Mar 22, 2021

this is likely due to your browser's history settings so the visited links are appearing blue. in @tw15egan's screenshot of the dev tools you can see that the #161616 color is correctly being applied to the element

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