Answers for "add alpha value to css color variable"

CSS
1

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