Example code (taken from less2css.org):
// Selector interpolation only works in 1.3.1+. Try it!
The value assigned to variable will also work if written this way (not escaped):
But will fail with a ParseError: Unrecognised input if any term has an hyphen (-) on it, like this:
ParseError: Unrecognised input
because it parses it as a css value. we do not parse for css selectors as variable values because we do not know what the variable is to be used as.
having said that maybe we should support a selector() function and everything inside is parsed as a selector?
Thanks for the answer, lukeapage, though I must admit I might not have understood it.
Let me try to rephrase the question:
Why this one works:
but this one throws an ParseError: Unrecognised input:
Both strings seems almost equal to me, only difference is that little hyphen on the second one, and that's enough to throw the error.
because of a fluke. - might mean maths or it might be part of a value so the value needs to be parsed properly. parsing properly we realise it isn't a css value.