Disambiguate curly brace {interpolation}
See original GitHub issueI believe that interpolation in Stylus could be improved if it made use of an extra character: perhaps as @{variable}
or #{variable}
, in order to distinguish an interpolation from a declaration / nested declaration / mixin definition / conditional statements etc. such as they would be written in CSS-style syntax, and would allow it to be used in other contexts more easily e.g. selectors or values. I’m specifically interested in the latter, as this was the way I had been using it in LESS (where @{variable}
outputs in string form in the value).
So although I know we can use the sprintf operation for values, it would just be elegant if the @{interpolation}
approach was simply adjusted so it worked everywhere, regardless of context. In my view it just needs to be kept separate from the other uses of curly braces, in order for this to be viable.
Anyway I’ve been super impressed with Stylus after first getting in to LESS–and finding that Stylus accomplishes nearly all of the shortcomings I ran in to with LESS; but was a little disappointed to find that interpolation had some limitations which seemed unnecessary and out of character with the rest of the language.
Issue Analytics
- State:
- Created 11 years ago
- Reactions:2
- Comments:25 (11 by maintainers)
#{} 👍
#{} 👍