This make sense. But unfortunately there too many possible value types beyond a string (e.g. an array, an expression etc.) so it still remains broken for "a complex" variable values... Ideally we should use `element.genCSS()` instead.

---
I was thinking of something like that (e.g. caching + correct `@{var}` expansion) here but before it would make sense to fix #1196 which in its turn means rewriting this whole thing completely from scratch (because we will need to switch from "element by element" to "string/substring" matching or a sort of).