Sclass

From Documentation
Revision as of 13:24, 19 January 2022 by Hawk (talk | contribs) (correct highlight (via JWB))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The sclass attribute is the way to add extra CSS Class to a component. By default, nothing is assigned to sclass (i.e. empty). Once you specify it with a non-empty value, ZK will add the specified CSS class to the root element as an 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" />

The sclass won't change the default CSS classes applied to a component, so all the default CSS rules will still be applied and inherited. This attribute is useful to fine-tune a particular component.

Version History

Last Update : 2022/01/19


Version Date Content
     



Last Update : 2022/01/19

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