Improve Compatibility with Browser Fallbacks 13

Tell us what’s happening:

I tried the code before and have read some of the other forum posts, but still nothing worked.

Your code so far

  :root {
    --red-color: red;
  .red-box {
  background: red;
    background: var(--red-color,);
    height: 200px;
<div class="red-box"></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36.

Link to the challenge:

1 Like


Look at your var(...).

There’s something out of place inside it.

Compare that to this sample code on MDN (line 5-7).