easysass icon indicating copy to clipboard operation
easysass copied to clipboard

Error when using #000000XX for transparent colors

Open lucianodinapoli opened this issue 5 years ago • 1 comments

I'm maintaining someone else's code and they used HEX transparent color codes. I get the following error when saving the file:

EasySass: could not generate CSS file.

and

Error: Invalid CSS after "color:": expected expression (e.g. 1px, bold), was "#00000087;"
        on line 606 of sass/project/src/Root.scss
>>   color: #00000087;

Strangely, if I replace #00000087 with #FFFFFF87 I get no errors and the file compiles successfully. Any rgba notation work fine.

lucianodinapoli avatar Oct 31 '19 15:10 lucianodinapoli

Still an error over 7 months later. It seems that when using hex values that start with a number you get the error. If it starts with a letter, no problem.

A work-around is to change the hex value to rgba. for example change #000b to rgba(0, 0, 0, 0.733) .

steebn avatar Jun 17 '20 15:06 steebn