A couple of steps are necessary in order to get Tridion to use a CSS preprocessor, but it certainly can be done:
- Install Sass on the Tridion server. Since Tridion runs on windows machines, you should install first Ruby, and then Sass. You need to be able to build Sass things from the command line.
- Make sure that
.scss
is a valid mimetype. Within the Tridion gui, goto Administration > Multimedia Types > Show Multimedia Types
. Click New Multimedia Type
and create one for scss
. look at the "Cascading style sheet" for inspiration on how to fill in the fields.
- Add Sass to the default multimedia schema. Find your default multimedia schema, open it up, and make sure that Sass is added to "allowed multimedia types".
At this point you can do the following:
- upload .scss files into tridion as binaries
- add them to a page under a component template (commonly the "code component template)
You could even publish the page, but it won't do you any good... yet!
You still need to build the Sass, for this is the more difficult and fourth step:
- Create a TBB that "processes" your preprocessed CSS. You'll need a .NET assembly to do this. That assembly should grab the .scss files via a webdav URL, execute the build command, and then the value returned should be the built page - which is now CSS.