Newbie Guide for People Patching Styles

= How Do I File a New Bug? =


 * In Bugzilla, click on New. Select Dreamwidth Development. In Component, select Style System. Enter a Summary and a Description. Mention style and author(s) in the summary. If you're patching a color theme, add author names and submission URLs to the description. If you're patching a style, mention the style name, the number of themes it has, the name of the default theme, the author's name and the submission URL.


 * Click on Show Advanced Fields. Set Initial State to ASSIGNED and enter your Bugzilla e-mail address in Assign To.

= Where Are Style Files? =


 * core2.s2 is in


 * Theme and layout .s2 files are in  or


 * .pm style files are in  or


 * S2Theme.pm is in


 * S2Theme_local.pm is in


 * s2layers.dat is in


 * s2layers-local.dat is in

= Dw-free or dw-nonfree? =


 * To be usable on the site, third party images must be obtained from a site which explicitly allows storage on one's own server, commercial use, and use in website templates, or the designer must have acquired a written permission from the image owner and included it in their Contributor Licensing Agreement. If this isn't the case, images must be replaced or removed from the style/theme.


 * Styles go to dw-nonfree if Dreamwidth can use them but can't redistribute/sublicense them.


 * Themes go to local files in dw-nonfree if they contain images Dreamwidth can use but can't redistribute/sublicense.


 * Themes go to local files in dw-nonfree if the base style is already in dw-nonfree. This the case for Transmogrified and Sunday Morning themes.

= Adding a New Style =

Edit s2layers.dat

 * If the style goes to dw-nonfree, edit  instead.


 * If this is a new Core2 layout, add:


 * If this is a child of Tabula Rasa, add:

Edit S2Theme.pm

 * If the default theme goes to dw-nonfree, edit  instead.


 * Scroll down to  and add the style and default theme:

Create STYLENAME.pm

 * Create STYLENAME.pm in  or.


 * Add:

Remove layout options that don't apply to the style, of course.

Create the STYLENAME directory

 * Create a directory with the name of the style in  or.

Create layout.s2

 * In the directory you've created, create a file named . Add:


 * Make sure to respect the designer's wishes concerning capitalization and that layerinfo author_name and layout_authors match.


 * If the designer doesn't want their name to be displayed as a username, use this instead:


 * If there are resources to credit, add them:


 * Add the style code.


 * If the style has custom properties, they should be sorted into existing groups (presentation, colors, fonts, images, modules, text, other) by appending  to the group name. For example:


 * If a module has more or fewer available positions than other modules, you can customize the sections it can be set to by using . For example:


 * Of course, you need to make sure it's printed correctly when set to every position, possibly by editing.

Check layout.s2

 * No tabs or trailing spaces.


 * No empty properties (S2 or CSS).


 * No hardcoded colors, fonts or text except shadows or /  characters.


 * No redundant code (S2 or CSS).


 * Format CSS to be easily readable and editable. Selectors should be listed in the order they're displayed on the screen, divided into sections thanks to comments, properly indented and spaced out; properties should be listed alphabetically:


 * Remove leading zeros from decimals (.5em instead of 0.5em).


 * Format CSS to use shorthand whenever possible:

instead of:


 * Group selectors whenever possible.

Create themes.s2

 * In the directory you've created, create a file named.


 * If some themes go to dw-nonfree, create  in dw-nonfree as well.


 * Follow the steps outlined in the next section.

= Adding a New Color Theme =

Edit themes.s2

 * If the theme goes to dw-nonfree, edit  instead.


 * Make sure the color theme has the right header. As Afuna explained here in dw_dev_training, it should look like this:


 * If the color theme author is not the style author, add this this line below, separated by a blank line:


 * Make sure to respect the designer's wishes concerning capitalization and that layerinfo author_name and theme_authors match..


 * If the designer doesn't want their name to be displayed as a username, use this instead:


 * If there are resources to credit, add them:


 * If there were already resources credited in the style, don't forget to add them again.


 * If the theme has any images, name them like this: . Keep the image name used in other themes if there are any.


 * If there's only one image, give it the theme name:


 * If the theme has generic images used in other themes, simply use.


 * In the theme, use,   or   as the URL.


 * If you need to add theme-specific CSS, use:


 * Make sure to add the theme code in the right place: themes should be alphabetically sorted.

Check your theme file

 * No tabs or trailing spaces.


 * No empty properties (S2 or CSS).


 * No hardcoded colors in  if possible.


 * Use shorthand for color codes whenever possible (#555 instead of #555555; #abc instead of #aabbcc).


 * Sort properties into categories. Possible categories are: Presentation, Page Colors, Entry Colors, Module Colors, Images and Fonts. Use these headers to separate each category:


 * Properties should be sorted alphabetically into each category, but sometimes logic should prevail. For example, generic properties such as color_page_background go before specific properties such as before color_header_background.


 * Format CSS to be easily readable and editable: use indents and spaces, list properties alphabetically, use shorthand whenever possible.


 * Each theme file must be separated by two blank lines. Leave one blank line after the last theme in the file.


 * If you see another theme which needs editing, do it in another patch.

= Adding New Files to your Patch =


 * Type  if this patch adds or delete files then.


 * If you're adding images, don't forget to zip them, attach them to your bug and set them to review ? and commit ?.

= Test, Test and Test =


 * In Customize, make sure everything is correctly listed and named. For styles, also make sure you can select the page layouts working with your style, and customize your style.


 * On your test account, check colors on all pages. Don't forget visited links, bottom links on comment pages and comment subjects. For styles, also make sure all types of layouts, all pages, all sorts of entries and comments are displayed correctly and do so in various screen resolutions and font sizes. Don't forget to check community journals too.

= Preview Pictures =


 * To make preview pictures, you need to take a screenshot of the Recent Pages of your test account. This account needs to have two or three dummy entries with dummy titles and a Dreamwidth icon, and generally few sidebar modules and no footer modules. Lorem Ipsum generators and screenshot extensions may help you with that.


 * It is best if you take your screenshot when your screen is set to a size of 1280x800 pixels as this is the most common resolution used by Dreamwidth users. A good font size is between 14 pixels and 16 pixels.


 * Screenshots must then be resized to 150x114 pixels. If doing so distorts the image, you need to edit the original screenshot in a photo editor program, edit entries, or add/remove modules until your screenshot can be resized without any distortion.


 * If you can't do preview pictures mention it so that someone can do them for you. You can also ask for help at dreamscapes.


 * A few tips:


 * It might be a good idea to create accounts specifically for making previews --one per style-- so that you don't lose your set-up.


 * If you have a program with scripting functions, you can use them to automate resizing and saving.