InDesign’s Styles palatte is an advanced way to make documents more efficiently by quickly assigning attributes like color, size, font, etc. to an item. Below is a demonstration of how the dependency-tree organization that Adobe’s style sheets allow can also help to organize a document’s elements and standardize layouts. Because this dependency structure is a key aspect of object-oriented programming, it is similar to the relationships at the heart of HTML’s Cascading Style Sheets and it is a basic part of modern programming languages like Java.
As a step toward demonstrating how Object Oriented Design principles can amplify the effectiveness of designers, I’ll show how styles work in Adobe’s InDesign software. Eventually I’ll connect the dots to show how this is like Java:
a. Using InDesign Paragraph Styles to Assign and to Organize (today)
b. Other Dependency Tools in Creative Suite (May 2011 – soon if you let me know this is useful!)
c. Dependency Trees in Programming (June 2011)
a. Using Styles to Assign and to Organize

1. I’ll start by looking at paragraph styles. If you create a new text box and find the “Paragraph Styles” palatte, you’ll see that – by default – InDesign is already using paragraph styles. It assigns text to the “Basic Paragraph” style, which is typically set to 12pt Times New Roman.

2. If you copy that textbox (leaving the original there for reference) and change the text in any way – by making it bigger, for example – you’ll see that InDesign still highlights the “Basic Paragraph” style in connection with the new textbox. However, if you look closely you’ll see it’s added a plus sign “+” beside the style name – this indicates that there is something else besides “Basic Pargraph” happening with this textbox. Adobe calls this deviation from the assigned style an “override”, meaning that this textbox has a paragraph attribute that overrides the paragraph attributes defined for “Basic Paragraph”. InDesign will show you specifically what has changed in a tooltip for an overridden paragraph style. In my example – with an invisible cursor, like all the others – the font size is all that’s different between the selected textbox and anything with a non-overridden “Basic Paragraph” style assigned.
3. [to do: show an insert -> Use Styles to Change Many Items at Once]

4. If you click the “new style” button within the Paragraph Styles palatte, InDesign will create a new style called “Paragraph Style 1″. InDesign doesn’t automatically assign the selected item to the new style – but it does create the style defined with all of the attributes of the selected item. To assign a style to the selected item, click the style. (You’ll notice that when you select another item – the original textbox for example – the Paragraph Styles box will reflect the style of that now-selected item.)

5. Creating another box helps to understand style dependencies*. If you select the second box (assuming you set it to Paragraph Style 1) then copy and paste it (or use the alt+click&drag shortcut) and create a new style for it as before (don’t forget to click the “Paragraph Style 2″ list item in the paragraph styles box), InDesign will automatically make the new style dependent on Paragraph Style 1. I’ve changed the font face of box 3 (before creating Paragraph Style 2) to help distinguish the boxes.

6. A style dependency allows us to change the look of many items with a single action – even if they’re assigned to multiple different paragraph styles. In particular: a base style (the style that another style is “based on”, in Adobe’s language) will pass on its attributes to dependent styles.** In the current example, this means that if Paragraph Style 1 is changed, items with Paragraph Style 2 assigned will inherit the new attribute (as long as that attribute isn’t one of Paragaph Style 2′s overrides).
To see this in practice, right-click (option-click for mac) on “Paragraph Style 1″ and select “Edit Style” to see the options panel. Select the “Character Color” palette and choose something other than default black and the textboxes assigned to both Pargraph Style 1 and 2 will respond (they’ll respond immediately if you select “Preview” at bottom left).

7. The first screen – the “General” palatte - in the Style Options panel makes explicit (if not entirely clear***) how the attributes are assigned. In the current example, Paragraph Style 2 has been created based on Paragraph Style 1, as indicated in the “Based On” field. This means that all of the attributes not listed under “Style Settings” are defined by Paragraph Style 1.

8. The interface doesn’t do a very good job at showing which attributes are inherited from Paragraph Style 1. Changing “Based On” from “Paragraph Style 1″ to “Basic Paragraph” will give a sense of which attributes come from the currently selected style (the ones that don’t change – in the example, the font face), and which ones come from the base style (any attributes which change – in the example, the color. This still leaves plenty of ambiguity if both base styles define any attributes the same way****.)

To demonstrate this relationship structurally, I’ve created a network diagram showing which attributes are passed to which textbox for each of the previous two steps.

The real power of this method is in creating more complex layouts. Let’s assume, for example, you wanted to create a document with multiple levels of headings and multiple kinds of annotations – you might end up with something like this.

The diagram detailing which attributes are overridden for each dependent style shows how a given change would cascade through the network. For example, changing the font of “Body Text” to Futura would also cause all the other styles to become Futura; adding a Futura override to “Heading” would cause all three headings to become Futura without affecting any of the annotations.
* why does indesign automatically make a style dependent on a created style, but not automatically make it dependent on the default one? Probably an interaction design thing – not forcing you to understand this palatte.
** This base/based-on relationship is known by many names, such as a parent/child relationship or an ancestor/descendent relationship.
*** Anybody know what “Next Style” means, is, or does?
**** A solution exists in the Firebug CSS module.
These examples all use Adobe’s Creative Suite 4.