stylus / nib

Stylus mixins, utilities, components, and gradient image generation
http://stylus.github.io/nib
MIT License
1.9k stars 250 forks source link

Retina image mixin not working #170

Closed optikfluffel closed 11 years ago

optikfluffel commented 11 years ago

Hi, I just tried to user your awesome retina image mixin but I'm getting this error:

/Users/user/Projects/project/node_modules/nib/lib/nib/image.styl:12
    8| image(path, w = auto, h = auto)
    9|   background-image: url(path)
   10|   @media all and (-webkit-min-device-pixel-ratio: 1.5)
   11|     ext = extname(path)
 > 12|     path = pathjoin(dirname(path), basename(path, ext) + '@2x' + ext)
   13|     background-image: url(path)
   14|     background-size: w h
   15| 

cannot perform basename() + '@2x'
    at image() (/Users/user/Projects/project/node_modules/nib/lib/nib/image.styl:9)

Am I doing something wrong or did I miss anything?

Versions I use:

"stylus": "~0.27.2",
"nib": "~0.9.1"
optikfluffel commented 11 years ago

updated stylus to 0.32.1 and it works