royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com.INVALID>
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.

HTH,
-Alex


On 3/4/18, 12:49 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlosrovira@apache.org> 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 <git@apache.org>:
>
>> carlosrovira opened a new issue #25: [CSS] rgba is not valid in
>>text-shadow
>> URL: 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fapache%2Froyale-compiler%2Fissues%2F25&data=02%7C01%7Caharui%40adobe
>>.com%7C949939debfdf4048414808d581acd7e2%7Cfa7b1b5a7b34438794aed2c178decee
>>1%7C0%7C0%7C636557501745639201&sdata=ieJ2z7RZQYwfkLJ8heL%2B%2BD8bt%2FRTcl
>>XroPqasIFMT14%3D&reserved=0
>>
>>
>>    Hi,
>>
>>    if I try to use something like: text-shadow: 0 -1px 0
>>rgba(0,0,0,0.70);
>>    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:
>> users@infra.apache.org
>>
>>
>> With regards,
>> Apache Git Services
>>
>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C949939debfdf4048414808d5
>81acd7e2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636557501745649210&s
>data=LSM2vJGQL3eQxITte9%2F8KBscR6Gm677nn%2BLQ4nGeZgE%3D&reserved=0

Mime
View raw message