I seem to have run into something strange with sass. I'm trying to get a 95% opaque version of #111111
but it seems that the opacify
function isn't returning the correct value. When I use the code below, the compiled stylesheet sets the background-color
to #111111
. I'm using opacify
because the color is being stored as a variable in hex and cannot be modified through standard rgba
if I want to continue using the variables. Code below:
$midnight: #111111;
.some-container {
background-color: opacify($midnight,0.95);
}
opacify
increases opacity. You want transparentize()
:
background-color: transparentize($midnight, 0.05);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With