Hi Carlos, If you can find a way to handle linear-gradient for SWF that would be great. I don't know this area of the code that well, but I think you have at least 3 choices:
1) Alter the AST 2) Output a String 3) Reduce it to a function call. FWIW, #3 requires changing the reducer which seems scary. I think I've avoided it so far. Options #1 and #2 are similar. I think you can see that the parsing sets up a data structure with things like CSSRgbColorPropertyValue and CSSFunctionCallPropertyValue. It should be possible to see that a CSSFunctionCallPropertyValue is a linear-gradient and swap it out for some other CSS structure that represents what the parser would have generated for: #1: backgroundColors: #000000, #123456; #2: backgroundColor: "linearGradient(#000000, #123456)" For #1, there seems to already be custom styles that end with "xxxColors" (note plural) that have a list of colors. For #2, you are trying to set backgroundColor to a String that the framework could parse at runtime. Good luck, -Alex On 3/6/18, 4:16 AM, "[email protected] on behalf of Carlos Rovira" <[email protected] on behalf of [email protected]> wrote: >Hi Alex, > >I'm looking into CSS compiler files and trying to see what to do. This for >the momento exceeds me, but I'll try to continue trying to understand this >part, but will need cross various emails with you: > >For this one: > >https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co >m%2Fapache%2Froyale-compiler%2Fissues%2F26&data=02%7C01%7Caharui%40adobe.c >om%7C5cf94961f3994e02456208d5835c29f8%7Cfa7b1b5a7b34438794aed2c178decee1%7 >C0%7C0%7C636559354222273618&sdata=jCD9%2FvfKxdW0TKwiJhMO%2FI7zwGI6cWaMQUYP >oTMk%2BJo%3D&reserved=0 > >I assume the point is in CSSReducer class (line 530), then I need to deal >with CSSFunctionCallPropertyValue > >but first of all is what to do with *linear-gradient(#3BB0FF, #1E36FA)'* >in SWF > >I think this value could not be valid in SWF for "background", but in that >case: > >* we can make it valid > >or > >* maybe for SWF there's some way to discriminate css rules for SWF and for >JS? > >(In the end if we want JS and SWF match, I think we should support >linear-gradients in SWF in some way > >Thanks > >-- >Carlos Rovira >https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2 >Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C5cf94961f3994e02456208d5 >835c29f8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636559354222273618&s >data=XOjs%2B44XE3iak7IvBiX3lajtbDPUe6XPBCKPg%2FGUqLU%3D&reserved=0
