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

Ruleset variables don't support @@ references #2213

Closed
matthew-dean opened this issue Sep 29, 2014 · 4 comments
Closed

Ruleset variables don't support @@ references #2213

matthew-dean opened this issue Sep 29, 2014 · 4 comments

Comments

@matthew-dean
Copy link
Member

Unlike other variables, rulesets don't seem to support @@ referencing. Meaning, this does not work (slightly modified from the Less docs):

@var: "fnord";
@fnord: {
    prop: value;
};
.content {
    @@var();
}

As expected, this works:

@var: "fnord";
@fnord: {
    prop: value;
};
.content {
    @fnord();
}
@seven-phases-max
Copy link
Member

Changing "bug" label to "feature request" since this was not something considered initially. But yep, this makes sense in a long run.

@matthew-dean
Copy link
Member Author

Oh okay. That's fine too. I classified it that way because the docs indicate all variables support this, and detached rulesets are assigned to a variable. But, granted, they're a quite special type of variable that already has some divergent usage. 👍 😄

@matthew-dean
Copy link
Member Author

By the way, I just discovered that this works as a workaround:

@var: "fnord";
@fnord: {
    prop: value;
};
@detached: @@var;
.content {
    @detached();
}

@stale
Copy link

stale bot commented Nov 14, 2017

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.

@stale stale bot added the stale label Nov 14, 2017
@stale stale bot closed this as completed Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants