[My Bad] ISSUES TO CHANGE OPACITY AFTER VARIABLES ARE DECLARED
Hey there folks, I hope this should be the right place to ask. I started just now the Space Travel Site course on Scrimba, but when we set up the variable of the colors I have trouble changing the opacity into the classes, and the code doesn't work.
Does anybody else have this problem like me?
Now I sorted the design system section but before going on with the rest I wish to fix this problem.
example: border-color: hsl( var(--clr-white) / .5 );
Thanks a million and see you at the next one.
4 Replies
What's the value of
--clr-white
?--clr-white: 0, 0%, 100%;
If I remove the opacity everything works good, I have this problem with each variable and I just following Kevin
you're mixing syntaxes.
either all commas
hsl(0, 0%, 100%, 0.5)
or spaces and a fw-slash hsl(0 0% 100% / 0.5)
foxy, I didn't see yesterday the difference with the Kevin file, he uses fw-slash because he doesn't use commas, but I copied the value from the figma file with all commas 😵💫 now I tried both ways and everything working fine. I learned something new, many thanks