-
1. Re: How to change the css of a skin?
sergeysmirnov Apr 2, 2007 2:39 PM (in response to dxxvi)http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105234
The corresponded article has been planned. Just vote for it.
And BTW, what "changing the css of a skin" means? -
2. Re: How to change the css of a skin?
dxxvi Apr 2, 2007 5:05 PM (in response to dxxvi)Sorry for an unclear subject. I meant modifying the css file of a skin (e.g. the blueSky skin). The reason for that is I might need to use a calendar component with RichFaces / Ajax4jsf and I want the font, the color ... in that component be the same is in other components.
-
3. Re: How to change the css of a skin?
sergeysmirnov Apr 2, 2007 6:12 PM (in response to dxxvi)Shortly:
1. Skin is a set of properties. You can access such properties using #{a4jSkin}. For example: #{a4jSkin.generalTextColor}
The default set of the parameters are shown in the documentation:
http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone/docs/devguide/Skinnability.html
2. You can use this EL directly in the style attribute. Like this:<h:outputText style="color:#{a4jSkin.generalTextColor}" value="FooBar" />
3. If you use facelets, you can even define the style class on the xhtml page. Like this:<style> .mytext { color: #{a4jSkin.generalTextColor}; font-size: #{a4jSkin.generalSizeFont}; } </style> ... <h:outputText styleClass="mytext " value="FooBar" /> ...
4. You can use external file to store your style class. It should be the .xcss file (XML CSS). <a4j:loadStyle> should be used to load it on the page.
The format and example of using skin parameters in the xcss you can find in the RichFaces SVN:
http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/ .
Look for .xcss files there. For example:
http://tinyurl.com/yrtuwt
===
So, if you have non-RichFaces components and those components' look-n-feel is customizable with style or/and style classes, you can bind some of style elements with skin parameters to make the components sensitive to the selected skin.