64006

Question:
I read <a href="http://learnboost.github.io/stylus/docs/hashes.html" rel="nofollow">http://learnboost.github.io/stylus/docs/hashes.html</a> and none of the examples not working for me. For exapmle
foo = {
bar: {
baz: {
raz: 10px
}
}
}
qux = "raz"
padding
padding foo["bar"].baz[qux]
a compilation error
expected "indent", got "eos"
What did I do wrong?
Answer1:You should use colon when calling hashes' values, as otherwise Stylus couldn't differentiate between selectors and hashes. So,
foo = {
bar: {
baz: {
raz: 10px
}
}
}
qux = "raz"
padding
padding: foo["bar"].baz[qux]
should work ok.