Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LESS version 4.0.0 requires parentheses after mixin calls #4391

Closed
billhemsley opened this issue Jan 21, 2021 · 6 comments
Closed

LESS version 4.0.0 requires parentheses after mixin calls #4391

billhemsley opened this issue Jan 21, 2021 · 6 comments
Labels
! Bug Something which isn't working as expected

Comments

@billhemsley
Copy link

UIkit Version

3.6.13

Actual Behavior

Errors when compiling with LESS 4.0.0 for lines where mixins are called and don't have parentheses.

Most errors are in the form "Unrecognized input. Possibly missing '(' in mixin call.", e.g. for heading.less line 64.

Also get "media definitions require block statements after any features" for print.less line 54 (a somewhat confusing message, but fixed by adding parentheses).

Steps to Reproduce the Problem

Compile to CSS using LESS 4.0.0

Comments

The change to parentheses being required is documented at:
less/less.js#3573

Presumably the fix is to add parentheses on all relevant lines, which I believe is backwardly compatible.

@billhemsley billhemsley added the ! Bug Something which isn't working as expected label Jan 21, 2021
@matthew-dean
Copy link

This is no longer relevant, as Less 4.1.0 reverts the paren requirement.

@billhemsley
Copy link
Author

That's good to know - I'll upgrade straight away!

It might be worth noting that mixins without the parens are deprecated and "will be required in a future release" (http://lesscss.org/features/#mixins-feature), and the removal of the requirement in 4.1.0 is "for this version" (https://github.com/less/less.js/releases). So it's possible the issue will return. And it might be good practice to use the parens anyway.

@matthew-dean
Copy link

@billhemsley Well I wrote both that piece of documentation and released both versions lol. It was true at the time, and for consistency, it's good to use parens, but I think it's looking increasingly unlikely that we'll ever enforce that change again, because too many libraries break.

@matthew-dean
Copy link

@billhemsley It's actually a good reminder that I should re-write that line in the documentation! ^_^

@janschoenherr
Copy link
Contributor

Thanks, guys, we've updated less to version 4 in v3.9.0

@janschoenherr
Copy link
Contributor

With 3.9.1 it uses parentheses now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
! Bug Something which isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants