I'm making my own SCSS framework for colors, borders and such.
I'm trying to create a class which would make the current background color of an element more transparent. The color would be set like this:
$bg-red: FF0000;
.bg-red {
background: $bg-red
}
I wonder if there is a way to add a class that could take the current background and just make it a bit more transparent, without rewriting the color everytime, because I would be dealing with hundreads of colors, something like this:
.bg-transparent-50{
background: (currentBackground, opacity: 50%)
}
I know I'm not using the right syntax but this is just for the sake of explanation of what I'm looking for, anyone know the answer to this?