3. check-box

check-box(key, value, ..., key, value)

Inserts a check box control in generated content. This control can be used to edit the value of the element which is the target of the CSS rule. If "attribute, attribute_name" is specified, this control can be used to edit the value of an attribute of this target element.

KeyValueDefaultDescription
attributeQualified name of attribute to be editedNo defaultWithout this parameter, the control is used to edit the value of the element for which the control has been generated.
labelStringNoneLabel used for the check box.
unchecked-valueStringNoneIn normal mode, unchecking the control assigns this value to the attribute or element value being edited.
checked-valueStringNoneIn normal mode, checking the control assigns this value to the attribute or element value being edited.
allow-empty-checked-valueBoolean: yes|no, 1|0, "true"|"false", "on"|"off"noConsider the empty string ("") to be an alias for checked-value. This parameter is used to implement XHTML5 form controls.
remove-valueBoolean: yes|no, 1|0, "true"|"false", "on"|"off"no

Turns remove value mode on and off.

In remove value mode, if unchecked-value is not specified, unchecking the control removes the attribute being edited.

In remove value mode, if checked-value is not specified, checking the control removes the attribute being edited.

If the value being edited is an element value rather than an attribute, this value is set to the empty string.

Key, value, ..., key, value may also specify style parameters.

Examples:

check-box(attribute, value,
          label, "On", 
          unchecked-value, "false", 
          checked-value, "true")

check-box(label, "Yes", 
          unchecked-value, "no", 
          checked-value, "yes")

check-box(attribute, value,
          label, "Disabled", 
          checked-value, "disabled",
          remove-value, yes)

check-box(label, "Hidden", 
          checked-value, "hidden",
          remove-value, yes)