![]() |
| > Home > Documentation > Latest documentation > Interchange tags > css |
|
cssBuilds a CSS file and outputs a link to the file. Summary
ExamplesTag usage example
DescriptionThis tag builds a CSS file from a Variable, or another source specified using the literal parameter, and generates HTML tag to serve the file to the website's visitors. If the target CSS file cannot be written, for whatever reason, then the CSS will be output to the page, inside a <style type="text/css"> block, instead. ParametersnameThe name of the CSS file that will be created by Interchange, updated as required and served website visitors. The filename will be forced to lowercase and a .css suffix will be appended. This is also the name of the Variable that will be expected to contain the CSS text, unless the literal parameter is specified. basefileThis file's modification time will be checked against the output CSS file. The output file will be rebuilt if it is older than this file. This is intended for use where the Variable, specified using the name parameter, has been set up using the DirConfig parameter. imagedirSpecify the CSS file's location. If the no_imagedir parameter is not specified then this parameter's value will be prepended to the CSS filename served to the website's visitors. no_imagedirWhen set true the imagedir prefix will not be prepended to the start of the CSS file</tt>. literalYou can use this parameter to specify the CSS text instead of using the "name" Variable. For example:
mediaSet the CSS media type, such as PRINT, SCREEN, AURAL and HANDHELD etc. modePermissions to use when creating the CSS file. output_dirDirectory in which to create the CSS file, with the permissions set using the mode parameter. relativeIf this parameter is set true then this tag will copy the directory hierarchy in the output_dir directory. For instance, if you set this to "foo/bar/index.html" then this tag would would output the CSS file to "images/foo/bar/mycss.css". That is assuming that the imagedir parameter, and/or the ImageDir configuration directive is set to "images". timedUsed for regenerating the CSS file on a timed basis. You can specify a number of minutes here, or can use any time interval, such as "1 hour".
|
| Home | Legal nonsense | Privacy policy | Contact us |