You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
The text was updated successfully, but these errors were encountered:
The final ; is expected since Less just can't know that your JS function returns a "string of ruleset(s)" instead of an expected single property value (and then for Less it's still a property value and not an "abstract CSS text", hence the property: whatever-your-function-returns; output with the semicolon).
So I see no issue here, it's expected behaviour (it's just the way you use the inline JS stuff is nothing but a hack-at-your-own-risk). Just one remark: since inline JS is actually highly anticipated, think twice before implementing a library of your helper functions this way (look at #1648 for why it's actually harmful). Instead consider writing a plugin instead (see the corresponding docs and an alt. #2522 plugin format which is probably more suitable for your needs).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
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.
The text was updated successfully, but these errors were encountered: