Sclass"
From Documentation
m |
m (correct highlight (via JWB)) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ZKStyleCustomizationGuidePageHeader}} | {{ZKStyleCustomizationGuidePageHeader}} | ||
− | + | The <code>sclass</code> attribute is the way to add extra CSS Class to a component. By default, nothing is assigned to <code>sclass</code> (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 | + | For example, assign <code>sclass</code> '''foo-pretty''' to a button component in zul page like this |
<source lang="xml"> | <source lang="xml"> | ||
Line 17: | Line 17: | ||
</source> | </source> | ||
− | + | The <code>sclass</code> 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= | =Version History= |
Latest revision as of 13:24, 19 January 2022
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
Version | Date | Content |
---|---|---|