Stylesheets are the facial cream of most websites and applications. The template engine handles the stylesheets in a special way.
All pages in an application select the wrapper they're loaded into. As mentioned. creating various wrappers is an excellent way of creating different layouts for various pages.
Let's assume we start with a completely empty project (ie, it has no templates whatsoever).
Ofcourse, we want to see it in action, so go to the "Wrappers" section and select the wrapper you want to attach the stylesheet to.
When you open the wrapper template (chances are it's called "default"), notice the info button. You can go ahead and click that.
A black info panel will slide down, showing the wrapper's information like name, content-type and the stylesheet.
The stylesheet(s) are presented in a drop-down control, allowing you to pick one of the stylesheets found in the application.
The idea is that stylesheets are attached to wrapper templates.
If you've selected a stylesheet in the dropdown and saved the wrapper template, open the web page in a browser to see it adopt the styles from your stylesheets.
Inside the wrapper template, near the top, you can find a variable called {$htmlheaders}. It will write (at least) two tags in the html, one <script> and one <link>
Let's forget about the <script> for now. The <link> will contain a url to /services/cssloader?<stylesheetid>
Because the stylesheets are saved to a database and need to be transferable between projects (think backup + restore) the stylesheet's id may change. The {$htmlheaders} variable knows this, and will adjust the id as necessary - ensuring your styles are always loaded correctly.
Now suppose you need to really structure your stylesheets, and you want to create a couple more. How do we do this?
Similar to the CSS "@import url()" method, the Template engine has it's own variant (but you're still free to import your own using @import!).
Let's assume there are 2 stylesheets in this application, 'main' and 'typography'. You can import 'typography' to 'main' using the following syntax:
@simport url('typography');
Eventhough url() might seem a bit off (name would have made sense), we tried to stay as close to CSS as you know it.