Donnerstag, 27. Oktober 2011

Using css in a Flex Library Project

Tested with Flash Builder 4.5.1

To make it work with Flash Builder:
  • File must be named defaults.css (not default.css!)
  • Must be checked as "Asset" in the Flex Library Build Path (Flash Builder)

  • For ant

    Note: the file defaults.css should be directly in root of your source-folder (might be "src").
     
       
         
         
         
       
     
    
    For further information: http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_22.html

    Example for css and usage

    Note: You do not need to import the defualts.css in any of your library-mxml-files because the defaults.css is used as default as the name already says.
    
    defaults.css
    @namespace s "library://ns.adobe.com/flex/spark";
    @namespace mx "library://ns.adobe.com/flex/mx";
    
    .userDataFormStyle s|FormItem
    {
    skinClass : ClassReference("spark.skins.spark.StackedFormItemSkin");
    }
    
    The style will be applied to:
    
    
    
    
    
    
    
    
    

    Keine Kommentare:

    Kommentar veröffentlichen