Reputation: 24748
I'm having a problem with that variables in some cases are not set correctly.
@index: 10;
[data-grid*='cols-@{index}'] > * {
background: red;
}
I use a variable index
with the value of 10. I would expect the @{index}
to be replaced with 10 but it doesn't. The result is [data-grid*='cols-@{index}']
and I don't get any errors.
Maybe I need to escape it somehow?
Upvotes: 2
Views: 104
Reputation: 6110
You kind of answered your own question: You should treat the whole selector as a string. This seems to work:
@index: 10;
(~"[data-grid*='cols-@{index}'] > *")
{
background: green;
}
Upvotes: 1