bdkjones / CodeKit2

CodeKit 2 Beta
98 stars 4 forks source link

Extra semicolon output #624

Closed googabeast closed 7 years ago

googabeast commented 7 years ago

Other compilers cannot handle the complexity of this so I was unable to isolate this down to the app, or the LESS language it's self. CodeKit is amazing btw!

Quick overview: There is a extra semicolon rendering as the last character output of a advanced mixin() that uses JavaScript, arrays, and for loops.

It still renders browser readable CSS, just doesn't pass validation and is another minor glitch I am attempting to overcome.

Also a posting on stackoverflow for the issue, just to see if others have encountered anything like this in the LESS language its self. http://stackoverflow.com/questions/39338429/less-outputs-extra-semicolon

Expected result: Not to include the extra semicolon at the end of the string.

Current output: @media only screen and (max-width: 1025px) { -lessMinded: "tablet"; body{ padding:30px } nav{ margin:10px } ul{ margin:10px } li{ margin:10px } p{ margin:10px } a{ margin:10px }; }

Repo: Add any new CSS property to any one of the testing tags within "/styles.less", when compiled you will see the above output within the media query.

Supplied files: _less.zip

LessMinded.less LINES 15 & 20 are the mixins() themselves being called.

LessMindedFunc.less LINES 4 & 10 are the JavaScript functions being requested by the mixins(). Function api.media() is the function that ends up outputting the additional semicolon. You can adjust the .substring() function on LINE 17 and regardless of the count it still returns the extra semicolon.

Info: CodeKit: Version 2.8 (19127) OSx: El Capitan Version 10.11.5 (15F34) Browser: Any (this is file output only) IDE: Sublime Text 3

Please let me know if I happen to be missing anything.

googabeast commented 7 years ago

Ok a stackoverflower did try a codepen and after a little tweak i was able to get it's results to show the same as above.

http://codepen.io/anon/pen/NRPrqx?editors=0100#0

Let me know if you would like me to close this ticket and chalk it up to the many bugs within LESS.

**UPDATE*** I'm closing this issue as it has become apparent by myself and others that this is not your wonderful app. Please continue the good work!

Moved to the LESS language https://github.com/less/less.js/issues/2959

googabeast commented 7 years ago

Keep up all the great work!