Setting Up a LESS Workflow in Sublime Text

LESS has been a popular way to streamline your CSS-writing for a while now, but fitting it into your workflow isn’t always easy. Some designers use standalone applications like CodeKit or SimpLESS to compile their LESS files into browser-ready CSS, but I prefer a more integrated approach. Fortunately, Sublime Text—my personal favorite text editor has several available extensions to build LESS support in.

I will assume that you already have Sublime Package Control installed, since it is pretty much a given for Sublime Text users.

Step 1: Adding Syntax Highlighting

I can’t imagine why anybody wouldn’t want their LESS files to have the proper syntax highlighting, so you probably want to install the LESS-sublime package, which you can find in Sublime Package Control under “LESS.”

Install Package

Step 2: Installing LESSC

Now you need to install the LESS compiler, but first you need to grab a couple of dependencies.

First, download and install Node.js. NPM (Node Package Manager) should also be installed automatically, so now you should be ready to install LESSC. Simply run the following command:

npm install -g less

Step 3: Installing a LESS Build System

In order to have your LESS files compiled into CSS, you will want to install the LESS-build package. Once it’s properly set up, it adds a Build System for LESS, enabling you to process the files by pressing Control+B (Command+B for Mac users).

After you have installed the package, you need to do a little configuration.

Browse Packages

  1. Open the package directory by typing “browse packages” into the command palette and selecting the LESS-build folder.
  2. Run changeLESSBuildType.bat (Windows) or changeLESSBuildType.sh (Mac/Linux) to set the build mode. Pick option number two (“directory rewrite”) when prompted.
  3. In your project, select “LESS” from the Tools > Build System menu.

Step 4: Using Your New Setup

To demonstrate how the finished setup works, I put together a quick project in Sublime Text. My simple index.html references css/mysite.css as its stylesheet. This is the compiled output of many LESS files, which are found in the less directory.

Sublime Text LESS Overview

The less/mysite.less file, which is compiled into css/mysite.css when I switch to it and press Command+B, looks like this:

//Load Twitter Bootstrap

@import "bootstrap/bootstrap.less";

//Additional styles would go here

It loads the LESS files that make up Twitter Bootstrap, which are easily tweak-able, since all of the styles are split into different files by sensible categories. Then any styles placed after the import line would override Bootstrap’s if they conflicted, given CSS’s precedence rules.

  • Zedlick A

    Sublime text is no doubt, one of the most powerful text. Denver Arborist

  • Lucas Quinn

    This extra charge has therefore been passed on to the client or person having a property cleared
    fly tipping clearances

  • JL

    Thank you for all this information.
    https://www.expertroofingcairns.com.au/

  • George Franks

    This has been really helpful.
    http://www.rubbishremovalgeelong.com.au/

  • Josh Albright

    What an impressive article! Thanks for sharing | jeep dealerships here

  • Robert

    My personal favorite text editor has several available extensions to build LESS support in. – Kitchen Remodel Anchorage

  • Hunter Hunter

    This is a relevant code. Very helpful for my friend Danny . Thank you.

  • luke white

    This is very useful, Thanks!

  • Amber Brion

    Great, I found a very useful details. http://www.inspectionmanaging.com/

  • Angie Lyn

    But fitting it into your workflow isn’t always easy. – Roofing Contractors

  • Rosa Mannelli

    Continue to share high-quality ideas! This information is wanted by a great amount of people.
    https://chesterbrookwaterproofing.com/foundation-repair-chesterbrook-pennsylvania/

  • Olive

    Great post! Glad to visit this awesome site. sunnysidetechrepair.com/

  • Mitch

    Thank you for sharing this great information. 1saferide.com/

  • Jan Wil

    This is a great article you shared. atoccleaningservices.com/

  • Anna

    I like the content you shared here. https://www.rxcrush.com/

  • Brett M

    Looking forward to more great posts from here. visit us

  • Kaysee Williams

    Thank you for sharing this step by step set up. I could definitely use this. site

  • Ginny Miller

    Very helpful content. Thank you. technical SEO

  • bellid

    Excellent content. Setting it up is still quite the tricky part. Nonetheless, greatly appreciate your work here! Custom Stairs

  • Georgia Miller
  • Vance Three

    My personal favorite text editor has several available extensions to build LESS support in. | Charlotte Drywall Contractors

  • Walter Haugen

    awesome post thank you for sharing check my article here Viral Growth Media

  • Darren Brunson

    Really impressive stuck here that is quite helpful for workflow with
    http://www.milwaukeehousepainters.com

  • Darren Brunson

    And I wanted to add one more thing that workflows make bigger processes even more manageable like when handling roofing http://www.rooferssheboyganwi.com

  • Walter Haugen

    Awesome post
    pandoras box arcade

  • Walter Haugen

    Awesome post viral growth media

  • Kaysee Williams

    Very detailed! Thank you for sharing these, would love to read more

  • Katherine Barreto

    Nice site. Keep up the great work Class Action Lawyer For You

  • Olive

    This is awesome! Thanks for this article you shared. info

  • Katherine Barreto

    Your Article is so good and informative thanks for sharing this content Join Stock Lawsuit

  • Brett M

    Thank you for always sharing here an informative content. https://www.redrocktax.com/

  • Walter Haugen

    Uncommon you have a legitimate assertion. Appreciation for sharing you considerations.
    I can share this.
    http://trevorcauk135.almoheet-.....the-better

  • Kadan

    Loving all the content on this website! Great guide.
    Bellevue Stamped Concrete

  • Wellie Johnson

    With its wide store of games, there is something for everyone to appreciate. So the thing could you at whatever point eventually say you are holding tight for? Get your hands on a Pandora Box 4S today. Check for more pandora box game list

  • Vance Three

    Because it was created in C++, Sublime Text feels snappy and speedy. In comparison, Atom is written in JavaScript, which is significantly slower than C++ in many tasks. As a result, sublime text seems more natural and is faster than Atom. Click here

  • Wellie Johnson

    There are electronic generally groupware and Advanced Business office stages along with gave PC programming answers open that control bunch plans and shared schedules. These permit both of those on and off-site staff individuals to acquire most recent timetables and up-to-day data on somewhat late planning alterations. Check for more https://juliuszlhg419.skyrock.com/3351309092-The-Most-Influential-People-In-The-Remote-Team-Group-Activities.html

  • Wellie Johnson

    Right from arranged capable and board retreats to preparing packs, thing presentations, urging force travel and inspector or Carrier social gatherings, this supplier researches site decisions, books the best scene and deal with the central issues by and large and facilitated errands. Check for more http://mb.tickets.wonderworkso.....class.com/.

  • Jennifer Smith

    Thank you so much for sharing an informative blog. Keep on posting. https://www.basementremodelingcleveland.com

  • Kaysee Williams

    This will definitely help our site . Thank you for sharing this.

  • Jonathan Butler

    Some great content on here thanks for sharing this
    Warrington house removals.

  • Wellie Johnson

    Consider how possible it is that somebody needs to pick after the cutoff time. When in doubt, can oblige late decisions with an extra rush expense. Liberal indication of relationship with your named occasion facilitator with any late individuals. Check for more http://www.wikalenda.com/redir.....class.com/

  • Kalvin darwan

    Any styles placed after the import line would override Bootstrap’s if they conflicted like https://www.instagram.com/sprayfoamproslafayette/

  • Wellie Johnson

    How much lead time do you have to send? Our classes require a 2-multi week lead time for transportation, subject to the class. The specific choice cutoff time will be given once your date and time have been embraced. directory

  • Olive

    Glad to visit this site again, thanks for the share. randmconcretewa.com/

  • Vance Three

    My preferred text editor includes a number of addons for adding LESS functionality. | https://www.charlottedrywallpros.com

  • Wellie Johnson

    How much lead time do you have to send? Our classes require a 2-multi week lead time for transportation, subject to the class. The specific decision cutoff time will be given once your date and time have been stayed aware of. this website

  • Walter Haugen

    Appreciation for the fair blog. It was incredibly useful for me. I’m cheerful I found this blog. Thankful to you for proposing to us, I likewise constantly find a couple of new data from your post http://www.gurufocus.com/ic/li.....class.com/

  • Wellie Johnson

    Experience everything from the NES and Atari to the Famicon and other collectible retro toys. Juegos Retro

  • Wellie Johnson

    Our classes require a 2-3 week lead time for shipping, depending on the class. The exact registration deadline will be provided once your date & time have been approved. this page

  • Wellie Johnson

    We have a 10-15 man least, contingent upon the class. The base for each class can be found on the class’ posting page. use this link

  • Wellie Johnson

    We have a 10-15 man least, contingent upon the class. blog here

  • BBC CARGO

    افضل شركة نقل عفش دبي – تخزين وتغليف الاثاث في دبي بأرخص الاسعار | نقل عفش من الباب للباب
    ارخص خدمة نقل عفش في دبي من شركة بي بي سي لخدمات نقل، تغليف، تخزين الاثاث | افضل خدمات نقل الاثاث في دبي الإمارات | تخزين وتغليف العفش في مستودعات تخزين دبي
    شحن اثاث من دبي الإمارات الى تركيا العراق لبنان
    شركة نقل اثاث دبي
    نقل اثاث دبي
    مخازن تخزين اثاث
    مستودعات تخزين دبي
    تغليف اثاث دبي