Exporting custom formatting to style sheets

When setting custom style properties for design elements, you can export the style attributes into a style sheet as a new style class. Then you can apply the style class to other design elements. Later, if you decide to edit the style class, your changes will take effect in all design elements that are associated with it without having to modify each design element individually.

Before you begin

About this task

To export a custom style to a style sheet, do the following steps:


  1. Open an XPage in the Xpages editor.
  2. Create your custom style using the Font, Background, and Margins panels in the Properties view.
  3. Click the Style tab. At the top of the panel, click Export next to the line that reads Custom formatting has been added.
  4. In the Export Custom Formatting dialog box, do the following steps:
    1. In the Attributes field, select the attributes you want to export to the style sheet.
    2. In the Style Sheet field, select a style sheet that you have added to the XPage. Optionally, you can click New to create a new style sheet or Import to import a style sheet from your local file system. If you create or import a style sheet, the style sheet automatically gets added to the current application.
    3. In the Style class name field, type a name for the style class.
    4. To apply the style attributes to the XPage or control that is currently selected in the XPage editor and remove any custom formatting for font, background, and margins, select the Apply this style class to the selected control and remove custom formatting check box.


Now, the next time you want to apply the custom style to a design element, you can click the Style tab in the Properties view and then select the style class in the Styles field.