TEMPLATE Procedure: Creating a Style Template

IMPORT Statement

Imports Cascading Style Sheet (CSS) information from a file into the style.
Restriction: The IMPORT statement must be used within a DEFINE STYLE template block.
Requirement: CSS files must be written in the same type of CSS that the ODS HTML statement produces. Only class names that match ODS style element names are supported, with no IDs and no context based selectors. To view the CSS code that ODS creates, you can specify the STYLESHEET= option, or you can view the source of an HTML file and look at the code between the tags at the top of the file.
Importing a CSS File

Syntax

Required Argument

file-specification
specifies a file, fileref, or URL that contains CSS code. After you import the CSS code, it is converted to style attributes and style elements that can be used with PROC TEMPLATE.
file-specification is one of the following:
"external-file"
is the name of the external CSS file.
Requirement:You must enclose external-file in quotation marks.
fileref
is a file reference that has been assigned to an external CSS file. Use the FILENAME statement to assign a fileref.
See:For information about the FILENAME statement, see SAS Statements: Reference.
"URL"
is a URL to an external CSS file.
Requirement:You must enclose external-file in quotation marks.

Optional Argument

media-type-1 <, .. media-type-10>
specifies one or more media blocks that correspond to the type of media on which your output will be rendered. CSS uses media type blocks to specify how a document is to be presented on different media (for example, on the screen, on paper, with a speech synthesizer, or with a braille device).
The media block is added to your output in addition to the CSS code that is not contained in any media blocks. By using the media-type option, in addition to the general CSS code, you can import the section of a CSS file intended only for a specific media type.
Default:If no media-type is specified in your ODS statement, but you have specified media types in your CSS file, then ODS uses the Screen media type.
Range:You can specify up to ten different media types.
Requirement:You must separate multiple media-types with commas.
Tip:If you specify multiple media types, all of the style information in all of the media types is applied to your output. However, if there is duplicate style information in different media blocks, then the styles from the last media block are used.