Hello,
The attached file contains two small examples.
Enjoy.
exactly what i was searching for, thank you
The example seems to be broken in O-S-C version 1.x:
The following CSS code triggers an error message : "error at line 0: ReferenceError: values is not defined".
#{
values = [9,11];
tralala = @{control};
selector = values[tralala];
}:host{
z-index:#{selector};
}
Yes, that’s expected, you can’t use #{} like this anymore. In v1 it would look like this
JS{{
locals.values = [9,11];
locals.tralala = @{control};
locals.selector = values[locals.tralala];
}}
:host{
z-index:#{locals.selector};
}
Shouldn’t it be modified like this?
JS{{
locals.values = [9,11];
locals.tralala = @{control};
locals.selector = values[locals.tralala];
}}
:host{
z-index:#{locals.selector};
}
Yes my mistake.