Answers for "override root variables css"

CSS
1

how to change root variable css

document.documentElement.style.setProperty('--your-variable', '#YOURCOLOR');
Posted by: Guest on January-21-2021
0

override root css variables

:root {
  --lightness: 68%;
  --orange: hsl(255, 72%, var(--lightness));
}
.card {
  background: var(--orange);
  --orange: hsl(255, 72%, var(--lightness));
}
.card:hover {

  --lightness: 45%;
}
Posted by: Guest on October-24-2021

Browse Popular Code Answers by Language