stylus / nib

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

Got compile error when tried to use placeholder #288

Closed seleckis closed 9 years ago

seleckis commented 9 years ago

This code

input
    placeholder(color #8c96a0)

triggers error:

>> Error: node_modules/nib/lib/nib/vendor.styl:541:42
>>    537|     &:{v}-placeholder
>>    538|       for pair in arguments
>>    539|         if typeof(pair) == 'function'
>>    540|           pair()
>>    541|         else if pair is not null && pair[0] is not null
>> -------------------------------------------------^
>>    542|           {pair[0]}: type(pair[1]) == 'string' ? s(pair[1]) : pair[1]
>>    543| input-placeholder = placeholder
>>    544| 
>> 
>> cannot perform color[(0)]
>>     at "&::-webkit-input-placeholder" (node_modules/nib/lib/nib/vendor.styl:537:55)
>>     at placeholder() (node_modules/nib/lib/nib/vendor.styl:536:13)
>>     at "input" (app/system/vars.styl:102:1)

Maybe something wrong with my stylus code?

seleckis commented 9 years ago

Oh, I've got it! I have to add comma before the closing bracket, like this:

input
    placeholder(color #8c96a0,)