RedHat-UX / red-hat-design-system

Red Hat's Design System
https://ux.redhat.com
MIT License
92 stars 18 forks source link

[bug] `<rh-card>` slotting a link inside the header slot doesn't work with color context #1717

Open markcaron opened 1 month ago

markcaron commented 1 month ago

Describe the bug

When adding a link inside the heading, the color doesn't change with the dark theme.

Screenshots

image

Steps to reproduce

  1. Go to Card's Color Context demo
  2. Add a link inside the heading.
  3. See wrong blue on dark background.

Expected behaviour

When in a dark theme, the link color switches to var(--rh-color-interactive-blue-lighter, #92c5f9)

Element HTML

<rh-card>
  <h2 slot="header"><a href="#">Default card, slotted content and footer</a></h2>
  ...
</rh-card>

Operating System (OS)

macOS

Browser

Chrome

Additional browser or assistive technology info

No response

markcaron commented 1 month ago

Hold on this until we discuss further.

After thinking about this, I have some reservations that adding a link in the heading will conflate<rh-card> further with <rh-tile>