Label: oxy_label() Function

This function can be used in conjunction with the CSS content property to change the style of generated text.

The arguments of the function are property name - property value pairs. The following properties are supported: If the text from an oxy_label() function contains new lines, for example oxy_label(text, 'LINE1\A LINE2', width, 100px), the text is split in two. Each of the two new lines has the specified width of 100 pixels.
Note: The text is split after \A, which represents a new line character.

You can use the oxy_label() function together with a built-in form control function to create a form control based layouts.

Example: oxy_label Function

An example of a use case is if you have multiple attributes on a single element and you want use form controls on separate lines and style them differently. Consider the following CSS rule:
person:before {
  content: "Name:*" oxy_textfield(edit, '@name', columns, 20) 
    "\A Address:" oxy_textfield(edit, '@address', columns, 20)
}
Suppose you only want the Name label to be set to bold, while you want both labels aligned to look like a table (the first column with labels and the second with a text field). To achieve this, you can use the oxy_label() to style each label differently.
person:before {
 content: oxy_label(text, "Name:*", styles, "font-weight:bold;width:200px")
          oxy_textfield(edit, '@name', columns, 20) "\A "
          oxy_label(text, "Address:", styles, "width:200px")
          oxy_textfield(edit, '@address', columns, 20)
}
Tip: A code template is available to make it easy to add the oxy_label function with the Content Completion Assistant by pressing Ctrl + Space and select the oxy_label code template.