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
Which when called will give me something like
.boxgreen {float: left; background-color: green;}
But if I already have .boxgreen manually (or dynamically) created why can I not do this.
.makeMeAColour(@colour) {
.box@{colour};
// hoping to essentially do the same as specifically writing .boxgreen;
// I have already tried ~(".box@{colour}); with no luck
}
.container {
.makeMeAColour(green);
}
// what I intend would happen is that container is now green, but instead nothing happens
I can use a variable to set a class name, but I cannot use a variable to straight reference another class to use as a mixin. Is this a bug, purposely left out feature, or am I not using the syntax correctly?
The text was updated successfully, but these errors were encountered:
this is a feature that is not implemented. For all new language features we would like a use-case as to why you want to use it like this (other than it would be cool if you could..). If there is no existing solution for the problem then we look at what solutions will be best.
Please feel free to put your usecase into #617, thanks.
I can create a new class by doing something like this
.makeNewBox(@colour) {
.box@{colour} {float: left; background-color: @colour;}
}
Which when called will give me something like
.boxgreen {float: left; background-color: green;}
But if I already have .boxgreen manually (or dynamically) created why can I not do this.
.makeMeAColour(@colour) {
.box@{colour};
// hoping to essentially do the same as specifically writing .boxgreen;
// I have already tried ~(".box@{colour}); with no luck
}
.container {
.makeMeAColour(green);
}
// what I intend would happen is that container is now green, but instead nothing happens
I can use a variable to set a class name, but I cannot use a variable to straight reference another class to use as a mixin. Is this a bug, purposely left out feature, or am I not using the syntax correctly?
The text was updated successfully, but these errors were encountered: