CSS files

The system for loading CSS files is similar to the system for finding layout templates. Which CSS files are loaded for a page is determined by the conf/css-files.xml. The root element of this file is an css-files element. This element has multiple application child elements. Each application has an mandatory attribute name which contains the name of the application for which the CSS files named in the element are loaded. There should be also an default element which determines the CSS files to load when no matching application element is found.

The name of an application is generated as follows:

Each application element and the default element in css-files.xml can contain multiple css-file element. Each of the css-file elements defines a single XML to load.

The css-file element has two optional attributes:

media
The media type, for example screen or print for which the CSS file is used. The value of this attribute will appear in the media attribute of the link element which is generated in the HTML to load the CSS file.
origin
The origin of the CSS file. If not set the file is loaded from the current theme. If set to master the file is loaded from the master theme if the current theme is a child theme. If set to internal the file is loaded from the internal directory for CSS files, either from the current theme (if the current theme is a master theme) or from the Foundry master theme installed at /themes/foundry.