Command Palette

Search for a command to run...

Hectal
Phase 10: Colour, Typography and Responsive Charts
Data Visualization · Exercise 3 of 4 PreviousNext
Intermediate

One class switches the theme

The card has a light and a dark set of tokens, but the bar's colour is typed into the SVG attribute, so adding the class dark to the card changes nothing for the bar.

Make the bar take its fill from var(--chart-accent). Adding dark to #card must turn the bar's fill into rgb(79, 209, 192).

What Check tests

  1. In the light card the bar is #1f7a6f
  2. After adding the class dark, the bar is #4fd1c0
  3. Switching back restores the light colour

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.