Sclass

From Documentation
Revision as of 07:51, 7 November 2013 by Vincent (talk | contribs) (Created page with "{{ZKStyleCustomizationGuidePageHeader}} 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). Onc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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.



Last Update : 2013/11/07

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