0 Replies Latest reply on Oct 23, 2008 6:30 AM by gonzalad

    Plug-n-Skin : externalizing gradient from .xcss to .properti

    gonzalad

      Hello,

      I'm playing with custom skinning (xcss files).

      I've created a sample xcss file, but I want to externalize gradient information in the .properties file.
      Is it possible ? How ?

      Thanks very much for your help !

      Use case detail :
      My use case is : I create a skin for all apps in my company, and I want app developpers to be able to override skin attributes in a property file.
      Some applications will have gradients enabled and others (which want to be full compliant with our company standard) will disable them.

      i.e. my skinText.xcss file (bundled in skinTest.jar) :

      <u:selector name=".rich-gradient-tab">
       <u:style name="background-image">
       <f:resource f:key="org.richfaces.renderkit.html.gradientimages.TabGradientImage"/>
       </u:style>
       <u:style name="background-repeat" value="repeat-x" />
      </u:selector>
      

      I want to have something like skinText.xcss file (bundled in skinTest.jar) :
      <u:selector name=".rich-gradient-tab">
       <u:style name="background-image">
       <f:resource f:skin="tabGradient"/>
       </u:style>
       <u:style name="background-repeat" value="repeat-x" />
      </u:selector>
      

      my skinText.properties (bundled in skinTest.jar) :
      tabGradient=org.richfaces.renderkit.html.gradientimages.TabGradientImage
      

      Sample application which will override gradient information :
      baseSkin=skinText
      tabGradient=#{null}