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

Mixin parameters can't be used in import statements #3218

Closed
lipis opened this issue Jun 16, 2018 · 2 comments
Closed

Mixin parameters can't be used in import statements #3218

lipis opened this issue Jun 16, 2018 · 2 comments

Comments

@lipis
Copy link

lipis commented Jun 16, 2018

When trying to compile the following

@web-font-path: "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700";

.web-font(@path) {
  @import url("@{path}");
}
.web-font(@web-font-path);

https://github.com/thomaspark/bootswatch/blob/v3.3.7/cosmo/bootswatch.less#L5-L10

I'm getting this error:

$ ./node_modules/less/bin/lessc cosmo/bootswatch.less
SyntaxError: variable @path is undefined in /Users/lipis/bootswatch/cosmo/bootswatch.less on line 10, column 1:
9 }
10 .web-font(@web-font-path);
11

Less version: 3.0.4 / macOS

@seven-phases-max
Copy link
Member

See #2772.

@seven-phases-max
Copy link
Member

Closing as duplicate of #2772.

@seven-phases-max seven-phases-max changed the title Syntax error for a function that seems correct. Mixin parameters can't be used in import statements Jun 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants