Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Hex color problem #39

Closed
satowine1 opened this issue Jan 23, 2018 · 5 comments
Closed

Hex color problem #39

satowine1 opened this issue Jan 23, 2018 · 5 comments

Comments

@satowine1
Copy link

satowine1 commented Jan 23, 2018

If i using this class:

.test{
  color: #00000020; 
}

with a color written in hex (recognized by VSCode), compiler send me this error:

Compilation Error
Error: Invalid CSS after "  color:": expected expression (e.g. 1px, bold), was "#00000020;"
        on line 784 of sass/c:\Devel\tomcat\webapps\synergy-config\hmi-pers\bootstrap\scss\_custom.scss
>>   color: #00000020; 

If i try to compile same file with another compiler like Koala, the hex color is processed without error.
I think there ia a pbolem with node-sass that not parsing well hex color too long.
It's possible to fix it?

@fluxxus
Copy link

fluxxus commented Jan 31, 2018

@satowine1 Just use HSLA or RGBA. HEX with alpha channel is so wrong :)

@satowine1
Copy link
Author

@madebym I know :) I already use rgba notation, but because i can write color with HEX notation, and i can compile them with another sass compiler, this is a problem that should be fixed imho :)

@ritwickdey
Copy link
Owner

Sorry for the late. This is a library issue. I've nothing to do. I'm now upgrading the extension. Will fix it after next update.

@ritwickdey
Copy link
Owner

This issue has been fixed from v3.0.0. Please let know if it's still not working.
Thanks for the report.

@Vatero
Copy link

Vatero commented Mar 31, 2019

This problem is not totally fixed when using custom css property.
For exemple:
:root{
--background-color: rgba(#000, 0.25);
}
doesn't compile to :
:root{--background-color: rgba(0,0,0,0.25);}
it stays in its original form

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants