Using Styles

For different types of frames you can define different Styles with plenty of properties.

Here is the comprehensive cheat sheet of all the stylable properties of frames!

Style User Interface

There are two different views available for Styles. By default the Style is shown with the UI at the Styles Tab.

UI View Style

But if you click on the brackets icon icon on the right top it will change to the Code Editor View.

Style Code Editor

The Style Code Editor helps you to edit styles as code with syntax highlighting, auto-completion, and error messages.
While typing, auto-completion will start to automatically display and filter options from items contained inside of your current code.

Auto Completion

To select an item from the list simply click on it or move up and down through the list with Cursor Up or Cursor Down and Return for inserting.

If an error is detected, an error message will appear at the bottom of the Editor tab.

For convenience, any colors used in a Style will create a small color patch to the left of the line where the color is mentioned.

Coded Style Syntax

If you are using the Code Editor to define Styles there is a certain CSS-like syntax you have to comply with. A Style is a collection of different properties and has a clear syntax:

.stylename {  
  propertyName:value;  
  secondProperty:value;  
}

Note that a Style always starts with a . directly followed by the name of the Style. Then comes the Style’s properties which are enclosed in two curly brackets {}. The properties are used to control nearly every aspect of a frame or its content (e.g., fillColor, textColor, strokeWidth, etc.).

Each property is set with its respective propertyName followed by a :. Then you input a value, followed by a semicolon ;.

If you click on the icon icon on the right top it will change to the UI View again.

Add a Property to a Style

Using the icon sign on the bottom of a Style adds a new property to the Style.

This opens the property selector which allows you to add all available Style properties sorted by frame type. Note that the text properties for a Multi Line text frame are located under Paragraph- and Character-Style.

Add Style property

Delete a Style

To delete a property in a Style or switch it to be directly controlled by a Form Field, simply select the property and open the drop-down with the triangle to the left:

Delete Style

Assigning Styles

You can assign a Style to a frame directly from the Style tab by selecting the target frame, then clicking the gear icon icon and selecting Assign to Frame. You can also remove all Styles assigned to a frame with Remove from Frame. Note that assigning a new Style to a frame will remove any previously assigned Styles.

Style Selector

In rare cases you may wish to assign multiple Styles to a frame. To do this you need to use the Style Selector in the Position icon tab to choose and add whatever Styles you want applied to the frame.

Style Selector

x Will remove a selected style.

Tip: Conflicting Styles Behavior
If you select multiple Styles containing the same properties (e.g., color) - the Style which appears last in the Style tab will determine the property independent from the order in which the styles are mentioned in the frame’s Style Selector.

Notice: Document Styles will take precedence over Template Styles.

Conditional Styles Helper

Styles can be made conditional. Read more about conditional styles here!

If a series of Styles are using the same Form Field to activate it, the Printess Editor automatically recognizes this and displays a little button on the top to set the Form Field value so that the selected conditional Style is active.

Style Wizard

This allows you to work faster as you don’t need to switch between the Form Field and Style tabs all the time while testing and adjusting. Check out our Avatar T-shirt example to see a bunch of conditional Styles in action.

Styles and Multi Line Text

Special kinds of Styles are the character, paragraph, and base Styles of a frame. Paragraph Styles may contain all paragraph properties (e.g., indents, alignments, and paragraph distances) plus all character properties like font size, font color, etc. Character Styles can only use character properties such as font size and tracking.

Both Styles can either be applied to the frame (by using the Style selector from above) or selected within the Multi Line Text Editor in the Text tab. Styles can also be comfortably created within the Multi Line Text Editor.

Learn more about Multi Line text frame features here!

Select Style

Both usages have different outcomes. If you apply a Style within the Multi Line Text Editor (paragraph or character Style Selector), the properties which are set in the Style tab will disable the respective UI elements and you cannot overwrite the properties.

If you set the Style for the complete frame, it will form the new base style of the text (resetting all styles will also revert to this style). Properties can be overwritten in Designer & Buyer Side UI.

This can be achieved by selecting the base Style in the Text tab while not being in the Editor:

Select Base Style

Another convenient option if no Style has been created is to format the text as you want the base Style of the frame to be (for a minimum of one paragraph) and while the I-beam pointer is in the paragraph press the Add Paragraph Style button:

Select Base Style

A popup will appear asking for the name of the Style, which you must enter and select Set as base style for selected frame. This will create a new Style and assign it to the current Multi Line Text Frame as its base Style.

Select Base Style

Tabulators

A special paragraph Style that cannot be addressed via the UI elsewhere are the tabulator settings.

Start by creating a new paragraph Style with tabulator settings included:

Create Tabs Style

This will create a Style where all tabulator-related properties are included. Alternatively, you can add them manually to a Style by adding from the paragraph Style properties.

Create Tabs Style

Here is the same Style expressed in code:

.Tabulator {
	fontSize: 24pt;
	fontColor: [Black];
	tabSize: 150%;
	tabs: L1cm C_3cm R5cm .7cm;
	tabLineColor: [Black];
	tabLineType: dotted;
	tabLineHeight: 1pt;
}

Rule Above, Rule Below

Another special paragraph Style that cannot be addressed via the UI are the ruleAbove and ruleBelow Styles. Either use Add rules above and below in the Create New Paragraph Style dialog or manually add the following properties to a style from the paragraph Styles properties.

ruleAbovexxx properties control a line above the paragraph and ruleBelowxxx properties control the line below a paragraph.

Select Style

The above Style will create the following output when it is assigned to the first paragraph.

Select Style

Here is the same Style expressed in code:

.headlineWithRuleBelow { 
 	font:Noto Sans; 
 	fontSize: 24pt; 
 	fontColor: [Black]; 
 	spaceAfterParagraph:15pt; 
 	 
 	ruleBelowWidth: frame; 
 	ruleBelowColor: Pink; 
 	ruleBelowOffset: 2pt; 
 	ruleBelowHeight:2pt;  
 	ruleBelowLineType:solid; 
} 

Condition Editor

The Condition Editor is a great way to build conditional Styles.

Please also read about conditional Styles here.

To add a condition to a Style press the icon icon at the bottom of the style and select Add Condition.

start condition editor

Once added it will have the start editor icon: icon beside the condition in a Style.

With the Condition Editor you can easily combine AND and OR conditions for all the tests you do.

Here is an example of a conditional Style which exchanges an image only when the Form Field ‘hairstyle’ is set to ponytail AND the Form Field ‘glasses’ is not set to glasses OR the Form Field ‘haircolor’ is not set to Blonde.

Below is this example condition represented in the Condition Editor:

start condition editor

A big plus with the Condition Editor is that all defined values from a selected list are directly shown in drop-downs.

This is how the condition looks in the Code Editor:

start condition editor

The Condition Editor is also used for conditionally visible Form Fields.

In addition to Form Field values, you can also use the following special values to test for:

Click here to open an example document for Styles