Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenating variables without having to force a type #1387

Closed
Naatan opened this issue Jun 26, 2013 · 1 comment
Closed

Concatenating variables without having to force a type #1387

Naatan opened this issue Jun 26, 2013 · 1 comment

Comments

@Naatan
Copy link

Naatan commented Jun 26, 2013

Please consider the following snippet as an example

@box-small: 10px;
@box-large: 100px;

.box(@suffix)
{
  width: ~"@{box-@{suffix}}";
}

div.small
{
  .box(large);
}

This would result in

div.small
{
  width: 100;
}

The way to fix this is by assigning the variables as strings, ie: @box-large: "100px";, but this seems very backwards to me as I would need to assign all my variables as strings and I would limit their usability in other areas (ie. calculations). Is there a way to force the type when the variable is used instead?

In short - any way to make above snippet work as expected without modifying the variable itself?

@lukeapage
Copy link
Member

Fixed in 1.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants