I already have it working. In case someone reads "CSS vanilla" and stays the same as I have ... "vanilla" = "the basics"
Thx Harbs. Hiedra De: Harbs <[email protected]> Enviado el: miércoles, 17 de marzo de 2021 16:23 Para: [email protected] Asunto: Re: CSS variables error Anything in here: https://www.w3.org/Style/CSS/specs.en.html On Mar 17, 2021, at 2:34 PM, Maria Jose Esteve <[email protected]<mailto:[email protected]>> wrote: Hahahaha, Do you notice that I am learning EVERYTHING? 😝, I'm going to find out what “plain vanilla” is and I'll tell you. Thanks Harbs Hiedra De: Harbs <[email protected]<mailto:[email protected]>> Enviado el: miércoles, 17 de marzo de 2021 13:30 Para: [email protected]<mailto:[email protected]> Asunto: Re: CSS variables error It needs to be a plain vanilla (HTML style) CSS file. Namespaces are not recognized in regular css. On Mar 17, 2021, at 10:21 AM, Maria Jose Esteve <[email protected]<mailto:[email protected]>> wrote: 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 <[email protected]<mailto:[email protected]>> Enviado el: miércoles, 17 de marzo de 2021 8:41 Para: [email protected]<mailto:[email protected]> 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 <[email protected]<mailto:[email protected]>> Enviado el: miércoles, 17 de marzo de 2021 7:26 Para: [email protected]<mailto:[email protected]> 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 <[email protected]<mailto:[email protected]>> 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.
