nex3/sass — Issue #210: Allow for Dynamic @import Calls
Author: parkr
Created: 2011-11-08 22:19:45+00:00
State: open

I cannot seem to use variables when using the `@import` command. I have 2 different styles (white & red) that I want to choose from. As I understand it, this is a Sass issue. At the moment, I have:

`screen.scss`:

```css
@import "main";
```

`main.scss`:

```css
$banner_color: "white";
@import "partials/identity";
@import "partials/search";
```

`partials/_identity.scss`:

```css
@import "identities/cu-" + #{$banner_color};
```

`partials/_search.scss`:

```css
@import "identities/search-" + #{$banner_color};
```

And I get this error when running `compass compile`:

```bash
error sass/partials/_identity.scss (Line 1: Invalid CSS after "...dentities/cu-" ": expected selector or at-rule, was "+ #{$banner_col...")
error sass/partials/_identity.scss (Line 1: Invalid CSS after "...dentities/cu-" ": expected selector or at-rule, was "+ #{$banner_col...")
```

It doesn't look like the variable is being properly concatenated. I tried interpolation (`@import "identities/cu-#{$banner_color}`) but that fails too...

Any reason this doesn't work?