I have this code snippet:
// Color settings
.setCat(@x) {
.cat@{x} {
.menu-link {
&.selected, &:hover { background: ~@{"catColor@{x}"}; }
&:hover:after { border-top-color: ~@{"catColor@{x}"}; }
&:only-child:after { border-top-color: transparent; }
}
.menu-link-submenu { background: ~@{"catColor@{x}"}; }
}
}
.setCat(1);
I hope you can see what I am trying to do. I want the @catColor1 output which LESS then will compile into my hex color stored in that variable.
Is this possible? Is there a better way?