royale-compiler icon indicating copy to clipboard operation
royale-compiler copied to clipboard

Include recognition of CSS variables

Open mjesteve opened this issue 4 years ago • 0 comments

Hi, 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.

Could this new option be included in the compiler? Should CSSLexer.java be modified?

Thx.

mjesteve avatar Mar 19 '21 11:03 mjesteve