Skip to content

Extra semicolon output #2959

@googabeast

Description

@googabeast

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

From another stack overflow developer a codePen that shows the same output.
http://codepen.io/anon/pen/NRPrqx?editors=0100#0

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.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions