DEV Community

jastuccio
jastuccio

Posted on

CSS variable fallback

example: <p> tags will be --text-color variable or fall back to black


:root {
  --text-color: #212121;
}


p {
  color: var(--text-color, black);
}

Enter fullscreen mode Exit fullscreen mode

Top comments (0)