sharat87
sharat87

Reputation: 7536

webkit gradient produces syntax error in lesscss

This is my first time experimenting with lesscss and am facing a problem with the following css/less code

body {
    background-image: -webkit-gradient(radial, 50% 0, 100, 50% 0, 0,
            from( rgba(255, 255, 255, 0) ), to( rgba(255, 255, 255, 0.5) ));
}

This is working fine as simple css, but the less compiler throws a syntax error at line 2. It doesn't give any other details. Can't I use webkit gradients when using less css? Or am I really doing wrong syntax?

Any help on this greatly appreciated. Thanks

Upvotes: 2

Views: 679

Answers (2)

sharat87
sharat87

Reputation: 7536

Turns out less doesn't like when there are spaces in the from and to directives. Like

from( rgba(255, 255, 255, 0) )

won't work. But

from(rgba(255, 255, 255, 0))

does. I personally feel this is a bug, but someone else might know better.

Upvotes: 1

Naveed Ahmad
Naveed Ahmad

Reputation: 3175

A quick tutorial, Take a look

Upvotes: 1

Related Questions