Scss variable 'unexpected term' when used in calc()

 

NVM: 

#{$variable}

 Here a sample:

height: calc(50% - #{$spaceBetween});
3
6 comments
Avatar
Permanently deleted user

Hello,

Could you provide a complete code sample, please?

Or were you able to resolve this?

0

Same problem to me. Here is a little example where $BASE_SIZE_LARGE is a "unexpected term", which is not possible to get rid of:

$BASE_SIZE_LARGE: 64px;
$PAGE_WIDTH_LARGE: calc(100% - 2 * $BASE_SIZE_LARGE);

I'm running:
Build #IU-172.4574.11, built on November 13, 2017
JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

0

Known issue, please vote for https://youtrack.jetbrains.com/issue/WEB-21705 to be notified on any progress with it

2
Avatar
Permanently deleted user

Any idea when this will be fixed? Or is there a way to hide it as an error?  It is not uncommon to want to do this but if you do you have error markers throughout your project.

1
Avatar
Permanently deleted user

Updated post:

height: calc(50% - #{$spaceBetween});
1
Avatar
Permanently deleted user

Fantastic. Thank you - that was driving me mad

0

Please sign in to leave a comment.