Overview
User-defined styles are a collection of macro styles. They enhance maintainability of portal pages by making control of their look more structured. These attributes apply to user-defined styles:
- Can contain pre-defined styles and other user-defined styles.
- Can be used wherever pre-defined styles can be used.
- Must belong to a style family.
- Cannot be recursive (self-referencing).
- Are not parameterized.
- Are stored as part of the style family XML in the IPF Style Families list.
Overriding from CSS
When a user-defined style is assigned to an item, a CSS class using
the same name is also added to the item in the generated HTML. Only the actual
user-defined style assigned to the item gets its class name added to the HTML,
not expanded user-defined styles within. Because all styles are injected before
the
Custom.css
file is included, there is a way to
override the style from the
Custom.css
file, if needed. This also limits the
format of user-defined style names to be valid HTML CSS class names.