My external CSS file is "assets / css / initializations.css" and I add it to 
the html template before "$ {application} .css":

    <link rel="stylesheet" type="text/css" 
href="assets/css/initializations.css">
    <link rel="stylesheet" type="text/css" href="${application}.css">

Test 1 - In the initializations.css file I include only the definition of the 
variables (it seemed that was what caused the error) - It does not work.


@namespace "http://www.w3.org/1999/xhtml";;
@namespace j "library://ns.apache.org/royale/jewel";

  .global {
    --pricolordark: #2196F3;
    --pricolorlight: #BBDEFA;
  }


Test 2 - In the initializations.css file I include the definition of the 
variables and all those styles that refer to them. In this case it "compiles" 
but does not recognize the assigned values. For example:

@namespace "http://www.w3.org/1999/xhtml";;
@namespace j "library://ns.apache.org/royale/jewel";

  .global {
    --pricolordark: #2196F3;
    --pricolorlight: #BBDEFA;
  }

  .jewel.topappbar .topBarAppHeader {
    background: val(--pricolordark);
  }

I will comment on github, as you suggest, because I doubt that I will be able 
to add it to the compiler 😝

Thx Harbs.

Hiedra

De: Maria Jose Esteve <mjest...@iest.com>
Enviado el: miércoles, 17 de marzo de 2021 8:41
Para: users@royale.apache.org
Asunto: RE: CSS variables error

Hi,
@Harbs, I'm going to try it again, it could be a “FALSE NEGATIVE” (a phrase 
that I'm getting used to lately 😝) or simply that she “was asleep”….
Now I tell you.

Hiedra

De: Harbs <harbs.li...@gmail.com<mailto:harbs.li...@gmail.com>>
Enviado el: miércoles, 17 de marzo de 2021 7:26
Para: users@royale.apache.org<mailto:users@royale.apache.org>
Asunto: Re: CSS variables error

 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.

Wait. Missed this line. Why wouldn’t it work?

On Mar 17, 2021, at 1:08 AM, Maria Jose Esteve 
<mjest...@iest.com<mailto: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