Search code examples
apache-flexantmoduleflex4mxmlc

Flex - Modules does not inherit css styles when built with ant


I'm creating a Flex 4 application which contains different modules in it. The main application contains a style sheet and the modules inherit the styles defined in this file.

Its working fine when the swf's are generated using Flash Builder. But when I'm generating it using Ant script, the modules does not inherit the styles and everything looks weird.

I added

isolate-styles="false"

as an additional parameter to mxmlc, but still its not working :(

Can someone please provide your suggestions?


Solution

  • Turned out to be a simple solution. All styles except fonts were inherited to the modules.

    mx|Module{
    font-family :   "Myriad Web";
    }
    

    Needs to be added when built using ant. Flash builder generated swf's were working fine with out this additional style definition. I had provided only

    s|Application {
    font-family: "Myriad Web";
    font-size: 12;
    font-anti-alias-type:advanced;
    }
    

    in the main style sheet.