Files

757 B

title
title
Improve Compatibility with Browser Fallbacks

Improve Compatibility with Browser Fallbacks

We need to add a fallback to the background property of the ```.black-box`` class.

Example

  :root {
    --black-color: black;
  }
  .black-box {
    background: var(--black-color);
    width: 100px;
    height: 100px;
  }

Solution

Add a fallback to the background property before the existing background declaration:

  :root {
    --black-color: black;
  }
  .black-box {
    background: black;
    background: var(--black-color);
    width: 100px;
    height: 100px;
  }