The APEX_CSS package provides utility functions for adding CSS styles to HTTP output. This package is usually used for plug-in development.
This procedure adds a CSS style snippet that is included inline in the HTML output. This procedure can be used to add new CSS style declarations.
APEX_CSS.ADD (
p_css IN VARCHAR2,
p_key IN VARCHAR2 DEFAULT NULL);
Table 4-1 describes the parameters available in the ADD procedure.
| Parameter | Description |
|---|---|
|
|
The CSS style snippet. For example, |
|
|
Identifier for the style snippet. If specified and a style snippet with the same name has already been added the new style snippet will be ignored. |
Adds an inline CSS definition for the class autocomplete into the HTML page. The key autocomplete_widget prevents the definition from being included another time if the apex_css.add is called another time.
apex_css.add (
p_css => '.autocomplete { color:#ffffff }',
p_key => 'autocomplete_widget' );
This procedure adds the link tag to load a CSS library. If a library has already been added, it will not be added a second time.
APEX_CSS.ADD_FILE (
p_name IN VARCHAR2,
p_directory IN VARCHAR2 DEFAULT WWV_FLOW.G_IMAGE_PREFIX||'css/',
p_version IN VARCHAR2 DEFAULT C_APEX_VERSION,
p_skip_extension IN BOOLEAN DEFAULT FALSE);
Table 4-2 describes the parameters available in the ADD_FILE procedure.
| Parameter | Description |
|---|---|
|
|
Name of the CSS file. |
|
|
Begin of the URL where the CSS file should be read from. If you use this function for a plug-in you should set this parameter to |
|
|
Identifier of the version of the CSS file. The version will be added to the CSS filename. In most cases you should set NULL as value. |
|
|
The function automatically adds ".css" to the CSS filename. If this parameter is set to TRUE this will not be done. |
Adds the CSS file jquery.autocomplete.css in the directory specified by p_plugin.image_prefix to the HTML output of the page and makes sure that it will only be included once if apex_css.add_file is called multiple times with that name.
apex_css.add_file (
p_name => 'jquery.autocomplete',
p_directory => p_plugin.image_prefix,
p_version => null );