Skip to content

@sikt/sds-badge: Variant "warning" has same color for light and dark mode

Bug report

Title

Variant "warning" has same color for light and dark mode

Component

Badge

Cause

  • Design
  • Development

Expected behaviour

Has separate colors for light and dark mode.

Current behaviour

Has same color for light and dark mode.

Possible solution

Not sure, I inspected the token --sds-color-support-warning-subtle and --sds-color-support-warning-strong and they both seem to be configured correctly? They have different colors here:

https://gitlab.sikt.no/designsystem/sds-komponentbibliotek/-/blob/main/packages/tokens/src/color/support.mjs#L24

Steps to reproduce

  1. Add variant warning to a <Badge /> component
  2. Toggle between light and dark mode
  3. Observe how the color does not change

Environement

Not applicable

Details

This only happens for the variant warning, all others change color when the theme changes. Happens for both subtle and strong visibility.

Can easily be tested in the Storybook here:

https://designsystem.sikt.no/storybook/?path=/docs/components-badge--docs

For reference, here are some images:

image

image

Edited by Andreas Tande