visionmedia/nib — Issue #69: linear-gradient produces errors
Author: panosru
Created: 2012-02-07 03:12:21+00:00
State: open

Hello I use this css code `linear-gradient(center top, #F5F5F5 0%, #EEEEEE 100%)` but I get the following error when I try to parse it with nib:

```
/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/nib/lib/nib/gradients.styl:120
116| add-property(prop, replace(val, '__CALL__', img))
117| start = start[1]
118|
119| // legacy webkit
> 120| end = grad-point(opposite-position(start))
121| webkit-legacy = '-webkit-gradient(linear, %s, %s, %s)' % (grad-point(start) end join-stops(stops, webkit-stop))
122| add-property(prop, replace(val, '__CALL__', webkit-legacy))
123|

invalid position center
at ".subnav " (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/front-end/assets/css/style.styl:61)

Error: /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/nib/lib/nib/gradients.styl:120
116| add-property(prop, replace(val, '__CALL__', img))
117| start = start[1]
118|
119| // legacy webkit
> 120| end = grad-point(opposite-position(start))
121| webkit-legacy = '-webkit-gradient(linear, %s, %s, %s)' % (grad-point(start) end join-stops(stops, webkit-stop))
122| add-property(prop, replace(val, '__CALL__', webkit-legacy))
123|

invalid position center
at ".subnav " (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/front-end/assets/css/style.styl:61)

at /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/functions/index.js:581:22
at /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/functions/index.js:582:7
at Array.forEach (native)
at Evaluator.oppositePosition (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/functions/index.js:574:33)
at Evaluator.invokeBuiltin (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/visitor/evaluator.js:775:28)
at Evaluator.visitCall (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/visitor/evaluator.js:329:16)
at Evaluator. (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/visitor/index.js:28:39)
at Evaluator.visit (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/visitor/evaluator.js:74:18)
at Evaluator. (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/visitor/evaluator.js:451:26)
at Evaluator. (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/stylus/lib/visitor/index.js:28:39)
```