How to make a style based on Tabula Rasa

It's encouraged to create each new style as child of Tabula Rasa. This layout sets up the basic conditions needed to make a functional journal, leaving you to code the appearance of your new style. Layouts which inherit the basic set-up from Tabula Rasa are easy to update later on. When someone makes a change to the way journals are displayed in S2, it will automatically be applied to child styles, without having to patch each one individually.

Using the layer editor
Find the layout code for Tabula Rasa. NB this layout is named core2base in the file system.

On Dreamhacks the file you want is:.

On Dreamwidth itself you can find the Tabula Rasa layer source.

Start by copying and pasting everything in this file into the S2 layer editor. Then on a new line, start the code for your new style using the normal headings, eg:

When you have finished you will have a layout layer with the complete code for Tabula Rasa followed by the complete code for your new style.

Editing files directly
Work in Newbie_Guide:_How_to_Patch_Styles_and_Themes exactly as for any style.

You don't need to paste the Tabula Rasa code in in this case. The backend will automatically create a layer which combines the Tabula Rasa code with your code.

Propgroups
If you want to add extra properties to appear in the customization wizard, you need to sort them into tabs. Tabula Rasa sets up most of the obvious ones already, but your style may need some extra.

Add the suffix  to the name of each   (tab). For example, an option for the presentation tab of the wizard goes in, like this:

Stylesheet
If your style has custom CSS defined in, you need to change that to a new function,

Add all the code to generate your CSS to the Stylesheet section, which should look like this:

This will apply the basic Tabula Rasa stylesheet, which controls some general positioning, and then your custom stylesheet which will give the page its finished appearance. The inheritance should work automatically. If you style an element which is already in Tabula Rasa's stylesheet, the style-specific one will take priority.

Remove redundancy
If you repeat code from Tabula Rasa in your style code, it will still work. Repeated code can cause problems later on, though. Compare the Tabula Rasa layer with your style layer, and remove
 * any options which Tabula Rasa already sorts into propgroups
 * any CSS instructions which are identical to the ones in Tabula Rasa's stylesheet.

Since Tabula Rasa doesn't have any functions apart from, any other new functions in your code (eg overriding  ) will likely not be redundant. Add these to the Newbie_Guide:_How_to_Patch_Styles_and_Themes section of your layout layer.