it's weird i just make a changes in the variable settings to use hashes instead... you know:
black = #000
is replaced by:
colors = {
'black': #000
// and so on...
}
Then, i replace all variable call's in the code (ofcourse) and all modules compile well, except one, this is the trace:
ParseError: ../../dopamine/components/_ui.styl:26
22| notice(clr: -colors['light-blue'])
23| color -colors['white']
24| font-weight bold
25| text-shadow 1px 1px 1px rgba(#000, .2)
> 26|
27| if type == "success"
28| notice(clr: -colors['green'])
29| color -colors['white']
expected "indent", got "outdent"
at Parser.error (/usr/local/lib/node_modules/stylus/lib/parser.js:230:11)
at Parser.expect (/usr/local/lib/node_modules/stylus/lib/parser.js:258:12)
at Parser.block (/usr/local/lib/node_modules/stylus/lib/parser.js:741:12)
at Parser.selector (/usr/local/lib/node_modules/stylus/lib/parser.js:1277:24)
at Parser.property (/usr/local/lib/node_modules/stylus/lib/parser.js:1228:47)
at Parser.ident (/usr/local/lib/node_modules/stylus/lib/parser.js:1183:25)
at Parser.stmt (/usr/local/lib/node_modules/stylus/lib/parser.js:685:26)
at Parser.statement (/usr/local/lib/node_modules/stylus/lib/parser.js:593:21)
at Parser.block (/usr/local/lib/node_modules/stylus/lib/parser.js:753:21)
at Parser [as if] (/usr/local/lib/node_modules/stylus/lib/parser.js:842:23)
So, i checked the basic common typing errors and another things, but i don't get the problem... in the last version did work, and i just changed the variables, i did not touch anything more. The code are in the following links:
error module variable settings
So, thanks for any answer!
Unfortunately, when using hashes as values you also need to use colons. So, instead of
.best-thing-ever
width 1234px
color colors['white']
font-size 23px
you would write
.best-thing-ever
width 1234px
color: colors['white']
font-size 23px
Note that the colon is only needed for properties that have hashes as values. See this related issue on GitHub for details.