royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <>
Subject Re: [GitHub] carlosrovira opened a new issue #25: [CSS] rgba is not valid in text-shadow
Date Sun, 04 Mar 2018 23:44:47 GMT
Hi Carlos,

It would be great to have more people work on the compiler.  Most of the
time, you don't even need any knowledge about compilers.  I certainly am
not a compiler person, I'm a UI coder, but I've had to learn more about
the compiler since few others seem to want to work on it.

There are a couple of areas to look at:
-There is a CSS Lexer/Parser in CSS.g and CSSTree.g.   I think it should
already allow RGBA but if not, you can look at recent changes to see that
I've extended it to handle a few other CSS functions.
-There is CSSCompilationUnit and JSCSSCompilationUnit.  And some related
classes like CSSDocument.  I believe it takes the AST generated by the CSS
Lexer/Parser and produces output.  The CSSCompilationUnit is for SWF, the
JSCSSCompilationUnit is for JS output.

I didn't understand the problem you are having, but if it is extraneous
output like "unexpected value type:", I would scan the compiler sources
for that string and it might point to the file that is generating that
output and maybe you only need to suppress that extraneous output.


On 3/4/18, 12:49 AM, " on behalf of Carlos Rovira"
< on behalf of> wrote:

>Hi Alex,
>I'd like to help with this kind of CSS compiler problems. Since I don't
>know too much about the compiler, and don't have the time to learn all
>that's involver, it's possible that I only could get knowledge of the
>concrete part that process the CSS?
>If that's possible, could you provide me some info on :
>* How royale compiler operate on CSS? (I assume that given .css files the
>compiler reads it and then retrieves the rules it knows and write a single
>file <app_name>.css
>* Where is the code in the compiler that read the .css files
>* where is the code in the compiler that has the knowledge about how to
>deal with CSS rules so I can modify or fix, add, remove...
>let me know if this is possible. I think I'll find various problems on the
>way and maybe it would be more easy that I can see if I can solve it.
>Some of the problems are:
>* support for rgb alpha (current issue)
>* pudo-elements like before: after: (I think that had problems)
>* percentages in gradients: i.e: linear-gradient (#000 %3, #fff %100);
>...and more as I see how to do it
>2018-03-03 18:19 GMT+01:00 GitBox <>:
>> carlosrovira opened a new issue #25: [CSS] rgba is not valid in
>> URL: 
>>    Hi,
>>    if I try to use something like: text-shadow: 0 -1px 0
>>    the theme and final app compiles but browser throws two errors at
>> runtime:
>>    App.js:573 Uncaught SyntaxError: Unexpected identifier
>>    index.html:282 Uncaught ReferenceError: App is not defined
>>        at index.html:282
>>    in App.js there's: this["textShadow"] = [0.0, -1.0, 0.0, unexpected
>> value type: rgba(0,0,0,0.70)];
>>    Unexpected identifier 'value'. Expected either a closing ']' or a ','
>> following an array element
>> ----------------------------------------------------------------
>> This is an automated message from the Apache Git Service.
>> To respond to the message, please log on GitHub and use the
>> URL above to go to the specific comment.
>> For queries about this service, please contact Infrastructure at:
>> With regards,
>> Apache Git Services
>Carlos Rovira

View raw message