-
FEATURED COMPONENTS
First time here? Check out the FAQ!
i can't understand yet, can someone explain to me with your own words?
zclass determines the style prefix used by ZK internally to define the overall look and feel of components based on the current theme:
All ZK components have a default zclass with acts as the basic styleclass and prefix for nested dom elements (e.g. <button>
has .z-button
, <window>
has .z-window, z-window-content
... and so on).
Unless you want to remove the theme styles from a specific component you don't change the zclass
.
More often you'll use the sclass
to add additional styles to a component e.g. <button sclass="myLargeButton">
.
Which will then render a button tag with both the default zclass and your additional sclass(es).
class
is simply a synonym for sclass
as you can see in the source code of HtmlBasedComponent it directly calls setSclass
.
In most cases you simply use sclass to add custom styles instead of replacing all default styles from the current theme.
Here an example illustrating this:
Asked: 2018-04-12 09:11:27 +0800
Seen: 68 times
Last updated: Apr 12 '18