Use Stylus CSS in Sublime Text 3

lockevn
1 min readSep 15, 2017

--

I used to use LESS, but Stylus look interesting, it is fewer characters to type, less code less error.

Here is how I can “transpile/compile” .stylus file to .css file in Build System of Sublime Text 3 (on Windows)

  • Install nodejs
  • Go to command line (Run as Administrator), run
    npm install stylus -g
install stylus module, in global mode
  • Open Sublime Text (I used v3)
  • Go to menu Tools / Build System / New Build System
  • Paste this

{
“cmd”: “stylus $file_name”,
“working_dir”: “$file_path”
}

  • Save it as my-Stylus.sublime-build
  • Done

Now you can open a test.stylus, with content

b
color blue

Press Ctrl B, then you have test.css with b {color: #00f;}

--

--

lockevn
lockevn

Written by lockevn

Developer, Sportman. Write code with joy, bake app with heart. Opinions are my own. If you feel I save your time, go http://BuyMeACoff.ee/Lockevn

No responses yet