The compiler needs to understand the css in order to compile it. Any features 
that the compiler doesn’t understand need to be added to the compiler. 
Definitely add this as a Github issue.

To use unsupported CSS features, you need a CSS file which is not run through 
the compiler. What I do is add a “defaults.css” file where I put that kind of 
CSS and add the following line to my template html file:

<link rel="stylesheet" type="text/css" href="./assets/css/defaults.css”>

HTH,
Harbs

> On Mar 17, 2021, at 1:08 AM, Maria Jose Esteve <mjest...@iest.com> wrote:
> 
> Hello,
> I am trying to use "variables" in my default CSS but not succeeding, when 
> compiling I get an error:
> Error: Unexpected exception 'java.util.NoSuchElementException' at 
> org.antlr.runtime.misc.LookaheadStream.LB:159
>  
> I have tried declaring them in ": root", ".global" and ".Application" but I 
> always get the same error.
> For example:
>  
>   .global {     
>     --pricolordark: #2196F3;
>     --pricolorlight: #BBDEFA;
>   }
>   .jewel.topappbar .topBarAppHeader {
>     background: val(--pricolordark);
>   }
>  
> I have found a thread from the old FlexJS forum where Harb and Greg comment 
> the same error but with the "calc" function. It seems that the solution was 
> to create an external css that would not go into the compilation process but 
> this does not work here.
> any ideas? Do you know if they can be used?
>  
> Thanks.
>  
> Hiedra.

Reply via email to