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.
Created attachment 142736 [details] screenshot of ide text editor Many SCSS files display "Unexpected token" errors of different kinds. This would not be critical except that it prevents Netbeans from using editor colours, document links, folding and all other IDE enhancements for any code after the errors (in some cases). This code is one such error: @each $ord in 1, 2, 3, 4 { body._#{$ord} #page { background: $page-bg url(#{$scssDir}/images/bg#{$ord}-squares-blue.png); } } This produces valid CSS when parsed by scssphp, but prevents Netbeans from implementing any advanced text editing features after it, as can be seen in the attached image. Here is the list of unexpected tokens found in the code (all but 'RBRACE' are from the 'background: ...' line): ERROR, WS, SOLIDUS, INDENT, RPAREN, SEMI, RBRACE Let me know if you require any more detailed information from me
Reproducible, thank you for reporting. As a workaround, you can close it in quotes background: $page-bg url('#{$scssDir}/images/bg#{$ord}-squares-blue.png'); Product Version: NetBeans IDE Dev (Build 201312020002)
*** Bug 241480 has been marked as a duplicate of this bug. ***
*** Bug 248898 has been marked as a duplicate of this bug. ***
@function oj-image-url($path){ @return url($imageDir + $path); }
*** Bug 246822 has been marked as a duplicate of this bug. ***
$imagesDir: "../../style/images/"; .xxx { content: url($imagesDir + "functional/func_back_24_ena.png"); }
*** Bug 233038 has been marked as a duplicate of this bug. ***
Please try this in sass file: @function composeURL($a, $b) { @return url($a + $b); } => line with url(..) is underlined, with unexpected token ERROR, SEMI and RPAREN. If I remove white spaces to @function composeURL($a, $b) { @return url($a+$b); } then error is gone but it is not recognized as variables (different color of $a and $b in braces, mark occurrences does not work
https://netbeans.org/bugzilla/show_bug.cgi?id=233038#c5
Another example from my LESS file: li { background: transparent url(@{img_path}list-bullet.png) no-repeat 0 0; padding-left: 14px; margin-bottom: 5px; } The hint shows up on the background tag.
Created attachment 156167 [details] screen shot of hint about unexpected COLON
Yes, thank you for more examples. I know that are many problems with how url doesn't parse in LESS, SASS. I will find a way in next release.
*** Bug 256049 has been marked as a duplicate of this bug. ***
*** Bug 256496 has been marked as a duplicate of this bug. ***
I made quick fix for url, so we accept almost anything in url(). It is not ideal solution, but better than having always error.http://hg.netbeans.org/web-main/rev/b31bee6809d7The only case this doesn't fix is following:url(add($a,$b)This change means that it parses some strings it should not. I will leave this open for better solution.
Integrated into 'main-silver', will be available in build *201512030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b31bee6809d7 User: Milutin Kristofic <mkristofic@netbeans.org> Log: #238988 - Errors in SCSS pasing: "Unexpected Token" in url()
Another error, not related with url(). The code .serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) { #font > .shorthand(@size, @weight, @lineHeight); } produces an "Unexpected token GREATER found" warning in the last line.
Same for the src attribute for font faces when there is an "if" inside the url: @font-face { font-family: 'myFont'; src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), '#{$icon-font-path}#{$icon-font-name}.eot')); font-weight: normal; font-style: normal; }
*** Bug 258158 has been marked as a duplicate of this bug. ***
Resetting Target Milestone since it has passed.