14

After upgrading Harp, I started getting an Unrecognized Input error in an irrelevant line of CSS.

Less -> CSS (Unrecognised input) /Users/jorge/Dropbox/harp.io/apps/mysite.com/public/css/main.less

Using Bootstrap v2.2.2 and Harp v0.9.4.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Jorge Pedret
  • 1,037
  • 1
  • 9
  • 16

1 Answers1

41

After digging for a while, I found that the error was coming from the mixin.less file where the #grid stuff was getting defined.

This is what the file had originally:

(~".span@{index}") { .span(@index); }

After reading the LESS change log, I found that they changed the syntax so you can now use variables directly without needing the ~ hack. So I changed my mixin.less to look like this:

.span@{index} { .span(@index); }

There are a couple of other lines that you need to change, but they all follow the same format.

(~".offset@{index}") { .offset(@index); } changes to → .offset@{index} { .offset(@index); }

Jorge Pedret
  • 1,037
  • 1
  • 9
  • 16
  • I'm a little late to the game working on a legacy project. Did you only change the one line, or did you change the entire `.spanX` all the way past `@index-1`? – Owen Jan 30 '14 at 23:33
  • I remember changing it in a bunch of places. Look for that pattern `(~".span@{index}") { .span(@index); }` and replace it with the suggestion. – Jorge Pedret Jan 31 '14 at 18:40