It might be namespaces, but we’ve seen a few folks struggling with this sort of 
thing.  In Flex 4 styles are per-module.  When a module is loaded, if a type 
selector in the module doesn’t match the main app’s copy of the type-selector  
or it doesn’t exist in the main app, then the module’s copy of the 
type-selector is used, and loading a new type selector into the main app won’t 
be seen by the module.


On 8/27/10 9:12 AM, "Haykel BEN JEMIA" <[email protected]> wrote:






CSS in Flex 4 uses namespaces and you have to update your Flex 3 CSS files. You 
can simply open the CSS files in Flash Builder, put the cursor directly after 
every class name in the selectors and click 'Ctrl'-Space and Flash Builder will 
add the namespaces.

Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com




On Fri, Aug 27, 2010 at 4:53 PM, Angelo Anolin <[email protected]> wrote:





I must assume that you are using Flex SDK 4.

I am currently having the same issues now.  Trying to port some Flex 3 codes to 
Flex 4 and a lot of styling and CSS things are going haywire.

I thought that developer and designer productivity has been greatly enhanced in 
SDK 4.0 but it seems that people who are both dev/designer at the same time are 
getting a hard time actually making the code work.

Angelo

________________________________
From: Jesse Warden <[email protected]>
To: [email protected]
Sent: Fri, 27 August, 2010 10:27:26
Subject: [flexcoders] styles are ignored




This Flex app loads in a module, and an external stylesheet (no, I can't get 
into why).  When I put my <mx:Style source="defaults.css" /> in the app, they 
don't show up.  If I trace out the CSSStyleDeclaration in creationComplete it's 
null.  The code doesn't allow me to compile with -keep-generated-actionscript, 
so it's not easy for me to figure out why.


So:
1. why the hell is it ignoring my syles; I have things like Selectors that are 
unique, yet aren't in StyleManager at all...?
2. If I load them in dynamically as a SWF, will that fix it?












--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to