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
is something like this possible, where I define a custom variable name "@my-red-color" via a function, then use that custom variable as a property value?
The text was updated successfully, but these errors were encountered:
For the feature-request see #2702 (there were also earlier threads but so far no good use-cases were suggested). From your example it seems like you're just looking for some sort of namespacing, though exact example/pattern would vastly depend on your actual use-case (after all it's not so easy to imagine how .color(~"red", #cc0000); could be better than @my-red-color: #cc0000; and when actually one need to change those prefixes and suffixes w/o actually changing background: @my-red-color;).
So here just a generic minimal namespacing example:
.theme(my) {
@red: #c00;
@blue: #00c;
}
.theme(your) {
@red: #933;
@blue: #339;
}
body {
.theme(my);
color: @red;
background: @blue;
}
p {
.theme(your);
background: @blue;
// etc.
}
// etc.
for example:
is something like this possible, where I define a custom variable name "@my-red-color" via a function, then use that custom variable as a property value?
The text was updated successfully, but these errors were encountered: