Sclass"
From Documentation
m |
|||
Line 1: | Line 1: | ||
{{ZKStyleCustomizationGuidePageHeader}} | {{ZKStyleCustomizationGuidePageHeader}} | ||
− | Styling Class (aka. | + | 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 (<javadoc method="setSclass(java.lang.String)">org.zkoss.zk.ui.HtmlBasedComponent</javadoc>), it will be added to the root element as an additional CSS class. |
For example, assign sclass '''foo-pretty''' to a button component in zul page like this | For example, assign sclass '''foo-pretty''' to a button component in zul page like this | ||
Line 17: | Line 17: | ||
</source> | </source> | ||
− | Sclass won't change the naming of the default CSS classes, so all the default CSS rules will be applied | + | Sclass won't change the naming of the default CSS classes, so all the default CSS rules will be applied and inherited. It is useful to fine-tune a particular component. |
=Version History= | =Version History= |
Revision as of 10:27, 21 November 2013
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 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" />
Sclass won't change the naming of the default CSS classes, so all the default CSS rules will be applied and inherited. It is useful to fine-tune a particular component.
Version History
Version | Date | Content |
---|---|---|