stylefmt icon indicating copy to clipboard operation
stylefmt copied to clipboard

Support to formatting LESS code

Open matype opened this issue 8 years ago • 12 comments

PostCSS LESS Syntax: https://github.com/webschik/postcss-less

matype avatar Mar 07 '16 01:03 matype

I'm trying to run stylefmt on my .less files, but it just outputs an empty file. I thought less was going to be automatically supported by virtue of the fact that stylefmt uses PostCSS, which does support less

cwick avatar Apr 22 '16 21:04 cwick

@cwick Now, stylefmt dose not support PostCSS syntax of Less. Sorry, please wait until the next minor update.

matype avatar Apr 26 '16 01:04 matype

@morishitter I've got it working with less fine, passing in a stylelint config file, and changing things throughout my less like indentation etc. The only thing I've noticed is inline styles that are multiline such as

// this is a comment
// here is another
// and one more

will become

// this is a comment

// here is another

// and one more

No changes to my config file are affecting this output.

robbyking3 avatar May 13 '16 20:05 robbyking3

@robbyking3 Inline comments are used in SCSS syntax, so stylefmt can format it. Some Less syntaxes are used in the other one, but we cannot format all of Less code.

matype avatar May 14 '16 05:05 matype

Sorry, please wait until the next minor update.

@morishitter Planned to add syntax less?

Tom910 avatar Jul 11 '16 10:07 Tom910

@morishitter I'd love to see the less syntax. Any updates about this?

qmmr avatar Dec 05 '16 18:12 qmmr

Hi. Any updates here? Is anybody working on it or not?

SanichKotikov avatar Mar 16 '17 09:03 SanichKotikov

@SanichKotikov,

Now postcss-less is broken. See Issues and Pull Requests.

mrmlnc avatar Mar 16 '17 09:03 mrmlnc

Any plans to support this at some point? Is there any other tool out there that formats less code?

vladtar avatar May 31 '17 13:05 vladtar

@vladimir-polyakov We have supported .less and .pcss files extentions by https://github.com/morishitter/stylefmt/pull/301 but stylefmt can't format all of less and postcss plugins customized syntaxes.

Is there any other tool out there that formats less code?

I'm sorry, I don't know ;(

matype avatar Jun 01 '17 02:06 matype

@morishitter Hi, I'm using stylelint on my LESS codebase and now I want to start using stylefmt but I have a problem that it doesn't understand LESS default mixins syntax.

  • less mixins errors
  • I'm getting this CSSSyntaxError on every usage of a LESS mixin.

Do you plan to support/fix this? Or is there any way how I can use stylefmt directly on my LESS codebase? Thank you for your reply ;-)

ondrejs2 avatar Jul 06 '17 08:07 ondrejs2

Hi!

Any update on this? I`m using stylefmt VS Code (1.19.2) plugin (2.5.0) and getting this error for every LESS mixin usage. less

Front-start avatar Jan 29 '18 00:01 Front-start