Title: Undeclared variables when compiling LESS
Last modified: August 22, 2016

---

# Undeclared variables when compiling LESS

 *  Resolved [DavidFraiser](https://wordpress.org/support/users/davidfraiser/)
 * (@davidfraiser)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/undeclared-variables-when-compiling-less/)
 * I am consistently getting “undeclared variable” errors when compiling the LESS
   files. If it was a just a few I would comment them out and move on, but when 
   I comment out one two more pop-up. I’ve tried 2 different compilers, so it’s 
   not that. The files are UTF-8 with no BOM, so it’s not that, either. I’m at a
   loss.
 * I’m also at a loss as to why no one else is reporting this issue, either here
   or on GitHub.
 * Here’s one example:
    `variable @grid-float-breakpoint is undefined @media (min-
   width: @grid-float-breakpoint) {`
 * Is it possible to just edit the .css files directly? I remember seeing a comment
   from you somewhere saying that was possible, with a caveat that “you’ll be missing
   out on all LESS has to offer.”
 * I mean sure, LESS is cool and all that, but I’ve spent 2 days already messing
   with different compilers and editors, thinking they were the problem. I just 
   need to get this project up and running. I can do “cool” another time when I’m
   not under a deadline.
 * I don’t mean to sound ungrateful at all, it’s just frustrating when 2 different
   compilers error out on code I haven’t touched.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Theme Author [DevDm](https://wordpress.org/support/users/devdm/)
 * (@devdm)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/undeclared-variables-when-compiling-less/#post-5324857)
 * David maybe you should zip your entire LESS directory and send it to me.
 * [danny@devdm.com](https://wordpress.org/support/topic/undeclared-variables-when-compiling-less/danny@devdm.com?output_format=md)
 * I think maybe you are trying to do something and not making the right connections
   with what to compile and where.
 * You can always just edit the style.css file of your child theme to add any CSS.
   You do not have to compile any of the LESS if you don’t want to.
 *  Thread Starter [DavidFraiser](https://wordpress.org/support/users/davidfraiser/)
 * (@davidfraiser)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/undeclared-variables-when-compiling-less/#post-5324858)
 * Thanks for the reply. From what I could find on StackOverflow, etc it’s a common
   error. Most people ignore them, but I don’t like to ignore coding errors.
 * And thank you for the offer to look at the directory, but that really wouldn’t
   solve anything. It isn’t rocket science, I have WinLESS open, I edit the .LESS
   file, the compiler “crunches” it into CSS, which I upload to the site. The errors
   two different compilers are reporting have to do with files I haven’t touched.
   The only files I editted were custom.less and navbar.less. The compiler(s) didn’t
   report any errors in those.
 *  Theme Author [DevDm](https://wordpress.org/support/users/devdm/)
 * (@devdm)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/undeclared-variables-when-compiling-less/#post-5324860)
 * I don’t think it is that common really when everything is implemented properly.
 * I’d like to help you figure out what you are doing wrong to save you pain in 
   the future and not have to ignore errors. 🙂
 * Let me know if you want to peruse it further. I’ll be available.
 *  Thread Starter [DavidFraiser](https://wordpress.org/support/users/davidfraiser/)
 * (@davidfraiser)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/undeclared-variables-when-compiling-less/#post-5324931)
 * For right now I’m just adding the CSS directly into the child style.css, and 
   that’s working perfectly. I’m migrating a site that was written using Bootstrap2,
   and your theme/framework has been the easiest to accomplish that.
 * At some point in the future I’ll reinstall your theme (a fresh copy) on another
   test site and recreate the changes, taking screenshots of any errors WinLESS 
   reports and send them to you. I do very much appreciate your offer to help, thank
   you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Undeclared variables when compiling LESS’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/devdmbootstrap3/1.80/screenshot.
   png)
 * DevDmBootstrap3
 * [Support Threads](https://wordpress.org/support/theme/devdmbootstrap3/)
 * [Active Topics](https://wordpress.org/support/theme/devdmbootstrap3/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/devdmbootstrap3/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/devdmbootstrap3/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [DavidFraiser](https://wordpress.org/support/users/davidfraiser/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/undeclared-variables-when-compiling-less/#post-5324931)
 * Status: resolved