This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257490 - LESS CSS unexpected token GREATER found - error parsing file
Summary: LESS CSS unexpected token GREATER found - error parsing file
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Preprocessors (SASS, LESS, ...) (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-08 21:06 UTC by mderungs
Modified: 2016-12-12 11:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Error in IDE (22.00 KB, image/png)
2016-01-08 21:06 UTC, mderungs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mderungs 2016-01-08 21:06:10 UTC
Created attachment 158072 [details]
Error in IDE

LESS v2.5.3 and installed to windows using node.js

Product Version: NetBeans IDE 8.1 (Build 201510222201)
Java: 1.8.0_66; Java HotSpot(TM) 64-Bit Server VM 25.66-b18
Runtime: Java(TM) SE Runtime Environment 1.8.0_66-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Milutin Kristofic 2016-02-12 15:42:58 UTC
Can you please send correct less css code with this error, so I can test it and fix it?
Comment 2 _ gtzabari 2016-05-03 13:54:01 UTC
Product Version: NetBeans IDE Dev (Build 201605020002)
Java: 1.8.0_92; Java HotSpot(TM) 64-Bit Server VM 25.92-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_92-b14
System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)
User directory: C:\dev\Netbeans\user\dev
Cache directory: C:\dev\Netbeans\cache\dev

Testcase code sniplet:

.bg-gd{
  #gradient > .vertical(rgba(40,50,60,0), rgba(40,50,60,0.075), 0, 100%);
  filter:none;
}
Comment 3 Milutin Kristofic 2016-11-22 15:46:45 UTC
Hi, can you explain your code for me?

Is #gradient > .vertical(rgba(40,50,60,0), rgba(40,50,60,0.075), 0, 100%); very complex mixin name? Can you send also mixin definition?

I played with it and i get erro from lessc:
NameError: .vertical is undefined in

NameError: #gradient > .vertical is undefined in /tmp/HTML5Application/public_html/less/newstyle2.less on line 11, column 3:
10 .bg-gd{
11   #gradient > .vertical(rgba(40,50,60,0), rgba(40,50,60,0.075), 0, 100%);
12   filter:none;
Comment 4 RayDeCampo 2016-11-22 16:01:27 UTC
I have the same issue, the code is generated by Twitter Bootstrap.  The definition of the .vertical mixin is:

  // Vertical gradient, from top to bottom
  //
  // Creates two color stops, start and end, by specifying a color and position for each color stop.
  // Color stops are not available in IE9 and below.
  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+
    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12
    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
    background-repeat: repeat-x;
    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
  }
Comment 5 Milutin Kristofic 2016-11-22 16:52:00 UTC
Ahh, I get it now, thanks. 

It's 
#gradient {
  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
      background-repeat: repeat-x;
      ...
  }
}


and then you can call it 
.bg-gd {
  #gradient > .vertical(rgba(40,50,60,0), rgba(40,50,60,0.075), 0, 100%);
}

Ok. So it is complicated mixin call, I will look how can I fix it in Netbeans parser.
Comment 6 Milutin Kristofic 2016-11-22 17:01:17 UTC
Ok, fixed in http://hg.netbeans.org/web-main/rev/426d187b8cf5
Comment 7 Milutin Kristofic 2016-11-22 17:05:38 UTC
I also tested bootstrap less files, and netbeans is now not showing errors in their code.
Comment 8 Quality Engineering 2016-11-30 02:54:28 UTC
Integrated into 'main-silver', will be available in build *201611300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/426d187b8cf5
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #257490 - LESS CSS unexpected token GREATER found - error parsing file
Comment 9 chillax86 2016-12-11 19:05:49 UTC
This has not been fixed for 8.2, are you fixing 8.2 soon?
Comment 10 Milutin Kristofic 2016-12-12 11:20:30 UTC
Hi, 
I am sorry I am fixing issue in development build and it will be only integrated in next netbeans version (probably Netbeans 9.0). You can use development build but it is more experimental.

http://bits.netbeans.org/download/trunk/nightly/latest/