TEMPLATE Procedure: Creating a Style Template

CLASS Statement

Creates a style element from a like-named style element.
Restriction: The CLASS statement must be used within a DEFINE STYLE template block.
Example: The following statements are equivalent:
class fonts; 
style fonts from fonts; 
style fonts from _self_;
Using the CLASS Statement

Importing a CSS File

Syntax

Required Argument

style–element-name
specifies one or more style elements to be duplicated and modified.
Tip:If there are multiple style element names specified within a style and an attribute is specified more than once, then the value of the last attribute specified is used.
See:For a complete description of style–element-name, see style-element-namein the STYLE statement.

For a list of style elements, see ODS Style Elements.

Optional Arguments

style-attribute-specification(s)
specifies new style attributes or modifications to existing style attributes for the new style element. Each style-attribute-specification has this general form:
style-attribute-name=<|>style-attribute-value
style-attribute-name
is the name of an attribute that is listed in Style Attributes Tables , or it is the name of a user-defined style attribute.
Tip:If style-attribute-name refers to a user-defined attribute, then enclose the name in quotation marks. If style-attribute-name refers to an attribute that is listed in Style Attributes Tables , then do not enclose the name in quotation marks.
style-attribute-value
assigns the value to the attribute. If an attribute from the table in Style Attributes Tables is specified, then specify the type of value that the attribute expects.
For more information about style-attribute values, see Style Attribute Values.
|
prevents the style attribute from being inherited by any child style elements.
Restriction:If there are multiple style element names specified within a style and an attribute is specified more than once, then the value of the last attribute specified is used.
Tips:Override any attribute of the parent style element, whether it is inherited or explicitly defined, by specifying it in the STYLE statement without the FROM option.

If an attribute is defined in a like-named style element in the parent style and it is not explicitly specified in the STYLE statement of the new like-named style element, then the attribute is not inherited, unless you specify the FROM option.

"text"
provides information about the STYLE statement. Text of this type becomes part of the compiled template, which you can view with the SOURCE statement, whereas SAS comments do not become part of the compiled style.