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

Nesting interpolated selectors under other rules #1466

Closed
sunyatasattva opened this issue Aug 4, 2013 · 3 comments
Closed

Nesting interpolated selectors under other rules #1466

sunyatasattva opened this issue Aug 4, 2013 · 3 comments

Comments

@sunyatasattva
Copy link

I can write this:

.define(@var){
    #namespace {
         @foo: @var;
    }
}

.define(0);

.test {
      #namespace;
      property: @foo;
 }
Outputs:
 .test {
      property: 0;
 }

I cannot write this:

 .define(@var, @ns){
     #@{ns} {
          @foo: @var;
     }
 }   

 .define(0, namespace);

 .test {
      #namespace;
      property: @foo;
 } 
Outputs:

Name error: #namespace is undefined even though it is defined. And it is verifiable with the following LESS:

 .define(@var, @ns){
     #@{ns} {
          @foo: @var;
          prop: @foo;
     }
 }

 .define(0, namespace);
Outputs:
  #namespace {
       prop: 0;
  }

Am I making some mistakes or this is a bug?

@lukeapage
Copy link
Member

It is debatable whether this is a bug or a feature request.. it was never intended to be able to call mixins defined via interpolation. There is a issue somewhere about this already and an explanation of why it is technically difficult but alas I cannot find it at the moment.

@sunyatasattva
Copy link
Author

I believe you are speaking about #1399, aren't you?

@lukeapage
Copy link
Member

yes.. closed as duplicate

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