64006

can't use Hashes from Stylus

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.

Recommend

  • How to get Javascript variable from an HTML page?
  • Select count() in Doctrine DQL with left join manyToMany unidirectional relation where user does NOT
  • How to store large queries inside code for ADO.NET project
  • Manipulate app permissions on iOS 8 simulator
  • how to inject a file into http request
  • Symfony 1.4 compatible I18N translation system?
  • Parsing string using the Scanner class
  • Is there a way to run c# forms application without showing a gui window (like a console application)
  • android check if file exists with case sensitivity?
  • Convert current tmux session to configuration file
  • Custom Timeline items in Glimpse
  • iOS App crashed com.apple.root.background-qos
  • How to create OLE Automation to be used with ClearExplorer
  • Write to elasticsearch from spark is very slow
  • How to get “crispEdges” for SVG text?
  • Showing image on a acro text field position
  • Sample deviceQuery cuda program
  • VBScript InputBox and Help Files
  • How to make Rss News Reader application in android …? [closed]
  • select an input by value?
  • Ember.js + JQuery-UI Tooltip - Tooltip does not reflect the model / controller changes
  • trigger ontouch event programmatically
  • Change the color of the legend text in forceNetwork for networkD3
  • Annotate objects in a queryset with next and previous object ids
  • How to split wav file into two or more parts using c#
  • How convert html to BBcode in C#
  • Google Spreadsheet Script to Blink a range of Cells
  • Content-Type alternative in MQTT
  • How to turn off notice reporting in xampp?
  • how to run ejabberd with Erlang on Heroku?
  • How do I add a mouse over tooltip to an Image using .DrawImage()
  • Unity3d lost directional light shadows after generate assetBundle (.unity3d file)
  • How to encrypt Connectionstring written in web.config from codebehind?
  • Apple Mach-O Linker error (“duplicate symbol”)
  • Call Microservice from another Microservice within Docker
  • How to mutate multiple variables without repeating codes?
  • Access to a Matlab gui from the web
  • JavaScript RegExp Replace