Saptam Dev
Saptam Dev

Reputation: 515

How to use rgb color in scss?

I'm using sccs. But when I use rgb/rgba color, then showing error. Otherwise It's work very well.

Error message:

enter image description here

If I use this, It's working.

$color: #f5325c;

.class-name {
    background-color: $color; 
 }

But If I use this, showing error:

$color:rgba(15,34,58,.12);

.class-name {
    background-color: $color;
}

Please help!

Thanks!

Upvotes: 1

Views: 3074

Answers (2)

Muzamil Abbas
Muzamil Abbas

Reputation: 702

I found that there is an issue with your scssphp compiler. It is not supporting the rgba value. Please see the thread. https://github.com/octobercms/october/issues/5058

Upvotes: 1

Chandler Bing
Chandler Bing

Reputation: 479

I don't really see a problem here in your scss code.
you can even use css variables if you want.

Upvotes: 0

Related Questions