Answers for "change opacity css variable"

CSS
2

add alpha value to css color variable

:root {
  /* #f0f0f0 in decimal RGB */
  --color: 240, 240, 240;
}

body {
  color: #000;
  background-color: #000;
}

#element {
  background-color: rgba(var(--color), 0.8);
}
Posted by: Guest on July-16-2021

Browse Popular Code Answers by Language