Bug 216509 - Support for SASS and/or LESS CSS syntax.
Support for SASS and/or LESS CSS syntax.
Status: RESOLVED FIXED
Product: web
Classification: Unclassified
Component: CSS Preprocessors (SASS, LESS, ...)
7.3
All All
: P1 with 16 votes (vote)
: 7.4
Assigned To: Marek Fukala
Vladimir Riha
:
: 207350 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-08 08:20 UTC by Pekz0r
Modified: 2015-09-14 05:56 UTC (History)
13 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pekz0r 2012-08-08 08:20:51 UTC
I've been using LESS and SASS for a while and I'm missing support for it in NetBeans. Both are languages makes traditional CSS much more dynamic by adding variables, functions(mixins), selector Inheritance and much more.
This has many advantages including faster development and CSS with much higher maintainability. The code is then compiled into fully compatible traditional CSS. You can also mix traditional CSS and LESS/SASS in the same file which means you can gradually enchant you existing CSS.

For more information you can visit the official websites: http://lesscss.org/ and http://sass-lang.com/

I would love to have support for this syntax in NetBeans. I've used the CSS-syntax interpreter but it does not work very well. 
Correct syntax highlight would be sufficient, and code completion would be fantastic! 

Maybe there's not so many developers using this right now, but I think that's mainly because they don't know about it. It's very easy to learn(same syntax as traditional CSS, but with some added features) and makes a huge difference. There is no reason not to use it except the small hassle of compiling it in my opinion. For development you can easily compile on the fly every page load.
Comment 1 Marek Fukala 2012-10-05 06:05:14 UTC
*** Bug 207350 has been marked as a duplicate of this bug. ***
Comment 2 dextervip 2012-12-24 17:56:10 UTC
It's a must-have nowdays! Please someone take attention to support less and sass, I am editing in netbeans as text/css but it doesn't reconize whole syntax such as variable, nested rules, functions, mixins,...
Comment 3 Pekz0r 2013-01-09 10:57:07 UTC
So this will be added to 7.3? In that case, Awesome and thank you very much! I really appreciate your work. Is it in the Beta 2 version (I would love to test this and report any bugs i can find back you you)?
Will this include code completion or only syntax support?
Comment 4 Marek Fukala 2013-01-09 12:08:17 UTC
I'm sorry, but I have to disappoint you. This is will not be a part of 7.3, but is planned as high priority feature for 7.3.next.

As for the feature set it is not decided yet, but I assume following:
P1 syntax support - coloring
P1 completion for keywords
P1 completion for vars
P2 vars mark occurrences, goto declaration, rename refactoring/find usages 
P2 semantic coloring, folds, navigator content
...
TBD
+ some Compass support

If you have some particular ideas for what you think should be supported, or what you consider the most important, just feel free to write it down here, any experienced real user feedback is welcomed!
Comment 5 inlogic 2013-01-09 12:18:42 UTC
This is awesome! One thing I would like to see is autocompletion for mixins/vars from files from @import declarations. Another awesome thing is if this is integrated with the built-in browser: When the user saves the file .scss, .sass, .less file, it is compiled and the browser window refreshed with the changes.
Comment 6 Pekz0r 2013-01-09 12:28:55 UTC
Okey, but it's great news that you start planing for this now!
7.3.next means 7.3.1 or what? Could I expect this before the summer?

I think that you got all the important features covered in that list and the priorities are as they should. Syntax support is by far the most critical
Are those features for SASS only or for both SASS and LESS?

One feature that would be nice is some kind of auto compile. When a file is saved the file will be compiled automatically and saved to a specified folder/path. 
One thing to keep in mind is that the completion, goto and refactoring features also should check in imported (@import) files. 
Other than that I think you got it all covered!
Comment 7 Marek Fukala 2013-01-09 12:48:45 UTC
(In reply to comment #6)
> Okey, but it's great news that you start planing for this now!
> 7.3.next means 7.3.1 or what? Could I expect this before the summer?
7.3.next means next major release which very likely won't be released before summer.

OTOH I plan to start the work on the next release with this SASS - LESS support, so sg. will be available quite soon in dev builds.

As for the SASS vs LESS, I'd like to do both starting probably with SASS.
Comment 8 dextervip 2013-01-09 23:44:14 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Okey, but it's great news that you start planing for this now!
> > 7.3.next means 7.3.1 or what? Could I expect this before the summer?
> 7.3.next means next major release which very likely won't be released before
> summer.
> 
> OTOH I plan to start the work on the next release with this SASS - LESS
> support, so sg. will be available quite soon in dev builds.
> 
> As for the SASS vs LESS, I'd like to do both starting probably with SASS.

Shouldn't be better start with less? check out google trends http://www.google.com/trends/explore#q=css%20sass%2C%20css%20less&cmpt=q

Less seems most popular
Comment 9 inlogic 2013-01-09 23:54:10 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > Okey, but it's great news that you start planing for this now!
> > > 7.3.next means 7.3.1 or what? Could I expect this before the summer?
> > 7.3.next means next major release which very likely won't be released before
> > summer.
> > 
> > OTOH I plan to start the work on the next release with this SASS - LESS
> > support, so sg. will be available quite soon in dev builds.
> > 
> > As for the SASS vs LESS, I'd like to do both starting probably with SASS.
> 
> Shouldn't be better start with less? check out google trends
> http://www.google.com/trends/explore#q=css%20sass%2C%20css%20less&cmpt=q
> 
> Less seems most popular

Google Search != Developer Usage. The great big reason why Less has more searches can be traced back to the ubiquitous Twitter Bootstrap using it.
Comment 10 BullfrogBlues 2013-01-10 08:31:01 UTC
(In reply to comment #4)
> I'm sorry, but I have to disappoint you. This is will not be a part of 7.3, but
> is planned as high priority feature for 7.3.next.
> 
> As for the feature set it is not decided yet, but I assume following:
> P1 syntax support - coloring
> P1 completion for keywords
> P1 completion for vars
> P2 vars mark occurrences, goto declaration, rename refactoring/find usages 
> P2 semantic coloring, folds, navigator content
> ...
> TBD
> + some Compass support
> 
> If you have some particular ideas for what you think should be supported, or
> what you consider the most important, just feel free to write it down here, any
> experienced real user feedback is welcomed!

I'm sold on syntax support and completion for keywords, the rest is great.

I can do without auto compiling until a later version, but I will prefer LESS support first.
Comment 11 dextervip 2013-01-10 16:04:48 UTC
(In reply to comment #4)
> I'm sorry, but I have to disappoint you. This is will not be a part of 7.3, but
> is planned as high priority feature for 7.3.next.
> 
> As for the feature set it is not decided yet, but I assume following:
> P1 syntax support - coloring
> P1 completion for keywords
> P1 completion for vars
> P2 vars mark occurrences, goto declaration, rename refactoring/find usages 
> P2 semantic coloring, folds, navigator content
> ...
> TBD
> + some Compass support
> 
> If you have some particular ideas for what you think should be supported, or
> what you consider the most important, just feel free to write it down here, any
> experienced real user feedback is welcomed!

It's important to support mixins, nested rules, functions and operations also. Nowdays there is a nb plugin but It doesnt support those at moment
Comment 12 Pekz0r 2013-01-10 21:18:22 UTC
I would probably prefer LESS first too.

(In reply to comment #7)
> (In reply to comment #6)
> > Okey, but it's great news that you start planing for this now!
> > 7.3.next means 7.3.1 or what? Could I expect this before the summer?
> 7.3.next means next major release which very likely won't be released before
> summer.
> 
> OTOH I plan to start the work on the next release with this SASS - LESS
> support, so sg. will be available quite soon in dev builds.
> 
> As for the SASS vs LESS, I'd like to do both starting probably with SASS.

Marek: Please drop a line here when this is added the the development builds so we can test it :)
Comment 13 visiomente 2013-02-01 20:57:25 UTC
LESS first and i think live browser refresh and minification should be much higher on the feature list.
Comment 14 kamm 2013-02-02 07:21:54 UTC
My vote is for SASS :)
Comment 15 ender01 2013-02-26 13:52:13 UTC
I'm going to vote for SASS as well on the first go around.

 Marek, have you looked at the available plugin: http://code.google.com/p/scss-editor/ as a starting point? 

It hasn't been updated in a while, but basic syntax highlighting seems to be there which is start. Not sure if it would really save you any time or not though. =\

Would it be possible to get this feature as a plugin so we wouldn't have to wait till the next release? I realize it's better to just have it a part of the IDE whole (no plugin hell please!) but would be nice to be able to use/test this sooner rather than later.
Comment 16 Marek Fukala 2013-02-26 14:00:50 UTC
(In reply to comment #15)
> I'm going to vote for SASS as well on the first go around.
> 
>  Marek, have you looked at the available plugin:
> http://code.google.com/p/scss-editor/ as a starting point? 
> 
> It hasn't been updated in a while, but basic syntax highlighting seems to be
> there which is start. Not sure if it would really save you any time or not
> though. =\
> 
> Would it be possible to get this feature as a plugin so we wouldn't have to
> wait till the next release? I realize it's better to just have it a part of the
> IDE whole (no plugin hell please!) but would be nice to be able to use/test
> this sooner rather than later.
Hi, the LESS syntax support is already in trunk for some time. It is not completed yet though - I spent quite a lot of time on extending the plain css3  parser so it can parse also the LESS syntax, so once I did the parsing I just implemented some trivial editing support (semantic coloring, instant rename, mark occurrences) and now I'm not the SASS parsing. Once I finish the SASS parsing I'll go back and work on the basic editing features (completion, indent, ...) for both in parallel. 

You can give the less support a try in a nb dev daily build: http://bits.netbeans.org/download/trunk/nightly/latest/

If you encounter some parsing issues (false errors etc.) please report them to web/css editor category and attach the sample file or just put a snippet into the summary.

Thanks
Comment 17 Marek Fukala 2013-02-26 14:02:23 UTC
> mark occurrences) and now I'm not the SASS parsing. Once I finish the SASS
correction: ...now I work on the SASS parsing...
Comment 18 ender01 2013-02-26 14:04:46 UTC
Thanks for the update Marek. I'll have to wait till you get the SASS support in, but it's great you are making progress! Will check out trunk once that's in place and see how it goes.
Comment 19 Eglados 2013-02-26 14:09:16 UTC
+1 for Less first :)
Comment 20 inlogic 2013-02-26 14:37:01 UTC
Awesome! Go Marek!
Comment 21 luislobo 2013-02-28 18:38:37 UTC
Thank you. I also prefer Less first
Comment 22 JannieT 2013-04-11 12:57:08 UTC
Great news, Marek!
Comment 23 Marek Fukala 2013-04-12 13:21:25 UTC
Please take a look at 

https://blogs.oracle.com/netbeanswebclient/entry/editing_css_preprocessors_sources

which briefly describes the CSS preprocessors editing features available in dev builds.

Please keep in mind the features were just slightly tested where the SASS (Sassy CSS syntax) was the priority #1 so LESS support can be more buggy. 

Any feedback including new feature requests is welcomed. Please file new RFEs/bugs. I'll try to fix/address them ASAP.

Thanks.
Comment 24 Pekz0r 2013-04-12 13:38:14 UTC
Awesome!

Is this in the 201304112301 dev build?
Comment 25 Marek Fukala 2013-04-12 14:25:06 UTC
> Is this in the 201304112301 dev build?
Yes. It is in the dev builds for some time already.

Tomas Mysik (tmysik@netbeans.org) works on SASS/LESS compilation support. I believe this functionality is also available in current dev builds in a reasonable shape. 

I expect Tomas will blog about this part of functionality as well at the same blog.
Comment 26 Tomas Mysik 2013-04-12 14:35:15 UTC
(In reply to comment #25)
> Tomas Mysik (tmysik@netbeans.org) works on SASS/LESS compilation support. I
> believe this functionality is also available in current dev builds in a
> reasonable shape.

Yes, it should be but please notice that specifying the output directory for compiler is still TBD.

> I expect Tomas will blog about this part of functionality as well at the same
> blog.

Yes, once it is finished.
Comment 27 Marek Fukala 2013-08-28 09:53:56 UTC
done


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo