Sclass

From Documentation
Revision as of 08:08, 7 November 2013 by Vincent (talk | contribs)


Styling Class (aka., sclass) is a way to add extra CSS Class to a component. By default, nothing is assigned to sclass (i.e., empty). Once it is assigned with a non-empty value (HtmlBasedComponent.setSclass(String)), it will be added to the root element as additional CSS class.

For example, assign sclass foo-pretty to a button component in zul page like this

<!-- index.zul -->
<button sclass="foo-pretty"/>

will generate the following output

<!-- HTML output -->
<button class="z-button foo-pretty" />

Sclass won't change the naming of the default CSS classes, so all the default CSS rules will be applied (aka., inherited). It is useful to fine-tune a particular component.

Version History

Last Update : 2013/11/07


Version Date Content
     



Last Update : 2013/11/07

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.