Ulysses Style Sheets Reference

Ulysses 2.5 ‐ 2016-03-10

Basic syntax

In the following chapter, we will give you a complete overview on the syntax of Ulysses Style Sheets.

Defining Styles

With Ulysses Style Sheets you are able to create custom rich text styles for exporting your Ulysses documents. In order to assign a style to a certain definition in Ulysses, you just write a so-called style class. A style class consists of a style selector and some style settings:

inline-strong {
    font-family: "Cochin"
    font-weight: bold
}

Style settings are written as key-value pairs, like font-family: "Cochin". A style setting ends on a line break. To place multiple settings in a line a semicolon ';' can be also used:

inline-strong { font-family: "Cochin"; font-weight: bold; }

Ulysses style sheets provide you a many flexible way to re-use style settings through variables and expressions. We give a more detailed overview on style settings later. You will find an overview on all style settings in the Settings Reference.

Style Selectors

A style selector specifies when a style should be applied. The most simple style selector is a definition selector, like inline-strong or heading-1. However, if you want to create a style for an entire class of definitions, you may also use definition class selector, like list-all. These selectors match any contents of a certain type: For example the selector list-all matches all lists: e.g. list-ordered and list-ordered.

Besides the definitions used in your Ulysses document, there are also some general class selectors that describe settings regarding the visual appearance of the entire exported document. For example, the selector area-header and area-footer can be used to style of the header or footer area of any page in your document. The class document-settings contains general settings of the document, like the paper format. The setting defaults describe the base style for any node inside your document.

You will find a comprehensive overview of all possible definitions and their settings in the Class Reference.

Relative Selectors

Style selectors can be used in a very flexible way: with a relative style selector, you can specify that a style should be only used for content placed in a special position relative to other content. For example you can declare a style that should be only used for paragraphs following a heading1 in your document:

heading-1 + paragraph {
    margin-top: 0pt
}

The following relations can be used for relative style selectors:

Relation Example Description
Definition strong The style class matches all nodes using a certain Definition.
Definition + SuccessorDefinition heading1 + all-paragraphs The style class matches all nodes using SuccessorDefinition that follow immediately a node using Definition.
ParentDefinition ChildDefinition area-footnotes image The style class matches all nodes using ChildDefinition that are somewhere nested under a node using ParentDefinition.
ParentDefinition > ChildDefinition orderedList > unorderedList The style class matches all nodes using ChildDefinition that are immediately nested under a node using ParentDefinition.

Pseudoclasses

Further refinements on a style selector can be done with pseudoclasses. Some pseudoclasses may be used to determine the position of a node inside its parent node. For example, by using the :first pseudoclass you can specify that a certain style may be only applied to the first paragraph of a block quote:

block-quote > paragraph :first {
   first-line-indent:   0pt
}

It is also possible to specify multiple pseudoclasses at once:

block-quote > paragraph :first :last {
   first-line-indent:   0pt
}

There are also pseudoclasses that match depending on the position on the generated output. For example, the pseudoclasses :left-page, :right-page can be used to specify the format of a header or footer when exporting the left or right pages of a two-sided document. Finally, there are pseudoclasses used to specify a certain aspect of a style. For example the :enumerator pseudoclass is used to style the enumerator of an ordered list (e.g. to make a bullet point bold).

Currently, the following psuedoclasses exist:

Name Availability Description
:first-page Headers and footers The style will be only applied to headers or footers that are on the first page of a section.
:left-page Headers and footers The style will be only applied to headers or footers that are on the left page of a section.
:right-page Headers and footers The style will be only applied to headers or footers that are on the right page of a section.
:anchor area-footnotes The style of the anchor inside the footnote area. See Inline Class. Defaults to superscript text.
:first Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical The style matches any node that is the first child of its parent.
:last Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical The style matches any node that is the last child of its parent.
:anchor Footnotes Used for styling referencing anchor of an annotation separated from the annotated content.
:enumerator List The style of the enumerator of a list. See list enumerator.

Evaluation Order

In some cases multiple styles may match your content like the following example shows:

list-all {
    margin-top:         5pt
    margin-left:        10pt
}

list-ordered {
    margin-left:        20pt
}

defaults {
    font-size:      14pt
}

In this case, styles are applied in the order of their occurence. For example, if a node of the type list-ordered should be styled first list-all will be applied, then list-ordered and finally defaults. Thus, the computed style will be:

margin-top:     5pt         // from list-all
margin-left:    20pt        // from list-ordered
font-size:      14pt        // from defaults

Inheritance

If you are exporting nodes that are nested in other nodes, the nested contents inherits all styles of higher level that it does not define by itself. Consider, you have the following Markdown document and the following Ulysses Style Sheet:

> # Heading with **strong text**
> Normal text inside quote

block-quote {
    font-family:    "Cochin"
    font-slant:     italic
}

heading-1 {
    font-family:    "Futura"
    font-size:      24pt
}

inline-strong {
    font-weight:    bold
}

The style of “strong text” will be derived by mixing the style of block-quote with heading-1 and inline-strong. Whereas the settings of inner elements overwrite the settings of outer elements. Thus, the computed style will be:

font-family:    "Futura"            // heading-1 overwrites the font-family of block-quote
font-slant:     italic              // Inherited form block-quote
font-size:      24pt                // Set by heading-1
font-weight:    bold                // Set by inline-strong

Mixins

Sometimes it is useful to create general presets that can be shared around multiple styles. For example the style inline-code and code-block may share the same font settings. This can be done by using mixins. A mixin is a set of predefined settings that can be embedded into other styles. The following example shows how a mixin @general-code-style is defined and how it is embedded to a style:

@general-code-style {
    font-family: "Courier"
    font-size:   12pt
}

inline-code : @general-code-style {
     color: #0000ff
}

block-code : @general-code-style {
      color: #ffffff
      background-color: #0000ff
}

A mixin identifier always starts with an “@” character. A mixin identifier may contain any alphanumeric character. Multiple words are typically separated by dashes: @my-mixin-name. It is applied to a style definition after the style selector using a colon “:”. To apply multiple mixins to a style, just use a comma separated list:

some-style : @first-mixin, @second-mixin, @third-mixin {
}

Using style settings

Any style consists of style settings describing all the visual details used for exporting a document. Typically, style settings consists of simple values - like assigning a setting font-weight the value bold

inline-strong {
  font-weight: bold;
}

Types

Every style setting has a type that defines the valid values you may use for it. The type of each settings is documented in the Settings Reference. Currently, the following types exists:

Type name Examples Description
boolean YES, NO, true, false A boolean value indicating that a setting is true or false. Allowed values are case-insenstive variants of: YES, NO and TRUE, FALSE. Whereas there is no difference between YES and true, or NO and false.
number -3.141 A decimal number. Negative or positive values are possible. The decimal point is optional.
length 5pt, 10cm, 30%, 4em An absolute or relative length value. Absolute values can be specified in pt, mm, cm, in. Relative values are typically relative to the current font size. They can be specified in em, en, ex, %.
string "Arial" A string value. Must be set into quotes. May contain also whitespaces. Used for any user-defined string values (e.g. font names or placeholder strings).
symbol bold, italic A symbolic setting. Possible values depend on the concrete style setting.
color #ff0000, rgb(255,0,0) An RGB color value. Can be either specified as 8-digit hex (#ff0000) or as sequence of three decimal numbers between 0 and 255 (rgb(255,0,42).
array [5pt, 3pt, 2pt] An array of values. Typically the elements of an array must have a certain type, too (e.g. an array of length values or symbols).

Expressions

Ulysses Style Sheets allow you to use more complex expressions, employing arithmetic operators (+, -, *, /) and even variables containing present values. In the following example a variable $base-size is defined that is used as base value for styling heading1 and heading2.

$base-size = 12pt

heading-1 {
     font-size: $base-size * 2
}

heading-2 {
    font-size: $base-size * 0.5
}

Variables

Variable names begin with a dollar sign “$“ and consists of any alphanumeric characters and dashes. They are declared by assignment statements using the form $variable-name = VALUE. Whereas variable values may contain arbitrary expressions and variables themselves. For example, you may create a variable $heading-size that is calculated from the value of $heading-size:

$base-size = 12pt
$heading-size = $base-size * 2

Operators

In general, any expression may contain arithmetic operators (+, -, *, /) that combine values and variables. To group expressions it is possible to use round brackets:

$some-variable = 4 * (5 / (2 + 3))

However, not every type supports any kind of operator. The following table shows you all possible combinations:

Left Operand Type Right Operand Type Allowed operation
Number Number +, -, *, /
Length Number *, /
Number Length *
Color Number *, /
Number Color *
Length Length +, -
Color Color +, -

Quick Reference

General Selectors

Headers and footers, area-footnotes, document-settings

Definition Selectors
Pseudoclasses

anchor, anchor, enumerator, first-page, first, last, left-page, right-page

Settings

Class Reference

This section describes all available classes that can be used to style the export of an Ulysses document. We distinguish between two major types of style classes: General classes and Defintion classes.

General classes

General classes are all style classes used to define the visual appearance of the entire exported document (e.g. document-settings or header). Currently, the following general classes can be used:

General class selector Description
document-settings Used to describe all settings regarding the appearance of the exported document.
Headers and footers Describes the layout and the content of a the header/footer of a page. Can be used to setup running headlines or page numbers. Inherits all inline and paragraph style settings. Provides special pseudo-classes :first-page, :left-page and :right-page that allow to style headers/footers on two-sided documents differently for first, left and right pages.
area-footnotes Describes the layout and the content of a the area containing the footnotes of a page or the endnotes of a section/document (see footnote-placement).

Please note that some styling options are only available to PDF export.
Definition classes

Definition classes are all style classes that can be used to style content with a concrete definition in your Ulysses document (e.g. strong or headline). You may currently use the following definition classes:

Definition classes Selectors Description
Inline inline-strong, inline-emphasis, inline-code, inline-citation, inline-comment, inline-raw, inline-mark, inline-delete, inline-link Inline classes are used for definitions typically applied to inline contents. The style settings of all parent elements (e.g. paragraphs, lists) will be also inherited to inline elements.
Media media-image Media classes are used to style image-like contents. To style figure-like images there is a special paragraph style paragraph-figures that is applied to all paragraphs only consisting of images, whitespaces and comments.
Footnotes inline-footnote, inline-annotation Footnote classes are used to style any footnote-like content, like footnotes or annotations. Footnote classes have a special pseudoclass :anchor that allows the styling of the anchor. This is especially useful for annotations, to style the annotated content differently from the anchor.
Paragraph paragraph, heading-1, heading-2, heading-3, heading-4, heading-5, heading-6, heading-all, defaults, paragraph-figure Paragraph classes are used for definitions typically applied to paragraph-level nodes. The style settings of all parent elements (e.g. lists) will be also inherited to the paragraph style. Inline-style settings specified in a paragraph class will be applied to all child nodes, if not overwritten.
Divider paragraph-divider The divider class is used to separate parts of the document logically. It may be either used to add a styled separator or to add a page break.
Block block-quote, block-code, block-raw, block-comment, block-all Block classes are used for any contents grouping multiple paragraphs, such as blockquotes or lists. They provide the same settings as paragraph classes. The top and bottom margins of a block will be applied to its first and last paragraph.
List list-ordered, list-unordered, list-all Lists are special blocks that consists of a list of items. Each item has an enumerator that may be counted. Lists have a special pseudoclass :enumerator that allows the styling of the enumerator of each item.
List enumerator :enumerator The style of the enumerator of a list.
Technical ulysses-tag, ulysses-whitespace, ulysses-escape-character, ulysses-escape Technical styles can be used for exporting Ulysses documents with full markup and whitespaces. Besides ulysses-escape, all technical styles are hidden by default.

General Classes Reference

General classes are all style classes used to define the visual appearance of the entire exported document (e.g. document-settings or header).

document-settings

Used to describe all settings regarding the appearance of the exported document.

Selectors
  • Definitions:

    • document-settings
Style settings
Setting Type Examples Description
column-count Number 2 The number of text columns used for output.
column-spacing-width Length 1cm The spacing between two text columns for multi-column layouts.
footnote-enumeration Symbol per-page, per-section, continuous Specifies how to enumerate footnotes.
footnote-placement Symbol end-of-page, end-of-section, end-of-document Specifies where to place footnotes in the document. (end-of-page not available in Pages.)
footnote-style Symbol decimal, lowercase-alpha, uppercase-alpha, lowercase-roman, uppercase-roman, chicago-style-manual The style that should be used for enumerating footnotes.
locale String "de", "en", "es" The locale that should be used for hyphenation if language detection fails.
page-binding Symbol left, right The position of the page binding.
page-height Length 21cm The height of the page.
page-inset-bottom Length 2cm, 72pt The spacing between the bottom border of a page and the page content.
page-inset-inner Length 2cm, 72pt The spacing between the inner border of a page and the page content. Depends on page-binding and two-sided.
page-inset-outer Length 2cm, 72pt The spacing between the outer border of a page and the page content. Depends on page-binding and two-sided.
page-inset-top Length 2cm, 72pt The spacing between the top border of a page and the page content.
page-number-format String "- %p -" The format string that should be used for page numbers.
page-number-reset Symbol none, per-section Specifies whether page numbers should be reset on each section.
page-number-style Symbol decimal, lowercase-alpha, uppercase-alpha, lowercase-roman, uppercase-roman The style that should be used for generating page numbers.
page-orientation Symbol portrait, landscape The orientation of a page.
page-width Length 14.8cm The width of the page.
section-break Symbol none, heading-1, heading-2, heading-3, heading-4, heading-5, heading-6, paragraph-divider Specifies whether headings or dividers will introduce a section break.
two-sided Boolean no, yes Specifies whether the output should be generated for two-sided printing or not.
Example
document-settings {
    page-binding:    left
    two-sided:       yes
    column-count:    2
}

Headers and footers

Describes the layout and the content of a the header/footer of a page. Can be used to setup running headlines or page numbers. Inherits all inline and paragraph style settings. Provides special pseudo-classes :first-page, :left-page and :right-page that allow to style headers/footers on two-sided documents differently for first, left and right pages.

Selectors
  • Definitions:

    • area-header

    • area-footer

Style settings

See also: Paragraph, Inline

Setting Type Examples Description
bottom-spacing Length 1cm The spacing on the bottom of a header / footer.
content Symbol none, heading, page-number The content that should be filled in to the header / footer.
top-spacing Length 1cm The spacing on the top of a header / footer.
Pseudoclasses
Class Description
:first-page The style will be only applied to headers or footers that are on the first page of a section.
:left-page The style will be only applied to headers or footers that are on the left page of a section.
:right-page The style will be only applied to headers or footers that are on the right page of a section.
Example
area-header :first-page {
    text-alignment:   center
    content:          heading
}

area-header :left-page {
    text-alignment:   left
    content:          heading
}

area-header :right-page {
    text-alignment:   right
    content:          heading
}

area-footnotes

Describes the layout and the content of a the area containing the footnotes of a page or the endnotes of a section/document (see footnote-placement).

Please note that some styling options are only available to PDF export.

Selectors
  • Definitions:

    • area-footnotes
Style settings

See also: Paragraph, Inline

Setting Type Examples Description
anchor-alignment Symbol left, right The horizontal alignment of a footnote anchor.
anchor-inset Length 10pt The inset of a footnote anchor inside the footnote area.
divider-length Length 2cm The length of the divider line of a footnote. (PDF only.)
divider-position Symbol left, right The horizontal position of the divider line of a footnote.
divider-spacing Length 1cm The spacing between the separator line of a footnote and its contents.
divider-width Length 1pt The width of the divider line of a footnote. (PDF only.)
text-inset Length 30pt The inset of the text of the footnote area.
top-spacing Length 1cm The spacing before the separator line of a footnote.
Pseudoclasses
Class Description
:anchor The style of the anchor inside the footnote area. See Inline Class. Defaults to superscript text.
Example
area-footnotes {
    font-size:         8pt

    top-spacing:       20pt
    divider-spacing:   10pt

    divider-length:    2cm
    divider-width:     1pt
    divider-position:  left

    anchor-alignment:  left
    anchor-inset:      1cm
    text-inset:        1.5cm
}

Definition Classes Reference

Definition classes are all style classes that can be used to style content with a concrete definition in your Ulysses document (e.g. strong or headline).

Inline

Inline classes are used for definitions typically applied to inline contents. The style settings of all parent elements (e.g. paragraphs, lists) will be also inherited to inline elements.

Selectors
Style settings
Setting Type Examples Description
background-color Color rgb(255,0,0), #ff0000, none The background color of the text. (PDF supports arbitrary colors. Colors will be converted to a predefined 16 color pallette in DOCX.)
baseline-shift Symbol normal, superscript, subscript The text position relative to the baseline.
character-spacing Length 12pt, 120% Additional character spacing.
font-color Color rgb(255,0,0), #ff0000 The foreground color of the text.
font-family String "Arial", "Menlo", "Helvetica Neue" The family name of a font.
font-size Length 10pt, 0.5em, 120% The size of the font used for styling text.
font-slant Symbol normal, italic The obliqueness of a font.
font-style String "UltraLight", "Condensed" The typographic style of a font.
font-weight Symbol normal, bold The weight of a font.
strikethrough Symbol none, single The strikethrough style of the text.
strikethrough-color Color rgb(255,0,0), #ff0000 The color of the text strikethrough. (PDF only.)
style-title String "Inline Code", "heading 1", "Paragraph (First)" The name of the style used for format templates in DOCX files.
underline Symbol none, single The underline style of the text.
underline-color Color rgb(255,0,0), #ff0000 The color of the text underline.
visibility Symbol hidden, visible The visibility of an element.
Pseudoclasses
Class Description
:first The style matches any node that is the first child of its parent.
:last The style matches any node that is the last child of its parent.
Example
// Example for inline node styling
inline-code {
    font-family:  "Menlo"
    font-weight:  normal
    font-slant:   normal
    font-color:   #ff0000
}

// Paragraph styles may also set inline styles
heading-1 {
    font-family:  "Futura"
    font-size:    20pt
}

Media

Media classes are used to style image-like contents. To style figure-like images there is a special paragraph style paragraph-figures that is applied to all paragraphs only consisting of images, whitespaces and comments.

Selectors
  • Definitions:

    • media-image
Style settings

See also: Inline

Setting Type Examples Description
margin-left Length 1em The left margin of the element. (PDF only.)
margin-right Length 1em The right margin of the element. (PDF only.)
Pseudoclasses

See also: Inline

Example
// Set left and right margins for all images
media-image {
    margin-left:   10pt
    margin-right:  10pt
}

// Paragraph style used for all figure-like images
paragraph-figure {
    margin-top:      1em
    margin-bottom:   1em
}

Footnotes

Footnote classes are used to style any footnote-like content, like footnotes or annotations. Footnote classes have a special pseudoclass :anchor that allows the styling of the anchor. This is especially useful for annotations, to style the annotated content differently from the anchor.

Selectors
  • Definitions:

    • inline-footnote

    • inline-annotation

Style settings

See also: Inline

Setting Type Examples Description
footnote-visibility Symbol visible, hidden Specifies whether the element should be actually treated as footnote or as ordinary inline text.
Pseudoclasses

See also: Inline

Class Description
:anchor Used for styling referencing anchor of an annotation separated from the annotated content.
Example
// Underline the annotated text
inline-annotation {
    underline:        single
}

// Style the anchor of a footnote
inline-annotation :anchor {
    baseline-shift:   superscript
}

Paragraph

Paragraph classes are used for definitions typically applied to paragraph-level nodes. The style settings of all parent elements (e.g. lists) will be also inherited to the paragraph style. Inline-style settings specified in a paragraph class will be applied to all child nodes, if not overwritten.

Selectors
  • Definitions:

    • paragraph

    • heading-1

    • heading-2

    • heading-3

    • heading-4

    • heading-5

    • heading-6

  • Generic:

    • heading-all: Matches any heading paragraph.

    • defaults: Used as base style for any styling within the document.

    • paragraph-figure:
      This style will be applied to all paragraphs that only contain images, whitespaces and comments. It may be used for styling images as figures. See media-image for more information on image styling

  • See also: Headers and footers, area-footnotes, Divider, Block, List

Style settings

See also: Inline

Setting Type Examples Description
default-tab-interval Length 4cm, 20pt, 4em The default length of the spacing between the beginning of two tab stops.
first-line-indent Length 1em The indentation of the first line of a paragraph.
hyphenation Boolean yes, no Whether hyphenation shold be applied to a paragraph.
justify-line-breaks Boolean no, yes Whether text should be justified on line breaks. (PDF only. Fixed line breaks are always justified when opening DOCX files in Microsoft Word, but not justified in Pages.)
keep-with-following Boolean yes, no Keep the paragraph with the following paragraphs if a page break occurs.
line-height Length 1em, auto The distance between the baselines of two adjacent lines of a paragraph.
margin-bottom Length 1em The bottom margin of a paragraph.
margin-left Length 1em The left margin of a paragraph.
margin-right Length 1em The right margin of a paragraph.
margin-top Length 1em The top margin of a paragraph.
orphans-and-widows Symbol allowed, prevented The handling of orphans and widows in paragraphs.
page-break Symbol none, after, before Specifies, whether a page break should occur before or after a paragraph.
tab-alignments Array left, right, center The horizontal text alignments for each tabulator.
tab-positions Array [4em, 8em, 12em, 16em] The start positions for each tabulators.
text-alignment Symbol left, center, right, justified The horizontal alignment of a paragraph’s text.
Pseudoclasses

See also: Inline

Example
// Default style settings
defaults {
    font-family:    "Helvetica Neue"
    text-align:     justified
}

// Paragraph style settings for all headings
heading-all {
    font-family:     "Futura"
    text-align:      left
    margin-bottom:   10pt
}

Divider

The divider class is used to separate parts of the document logically. It may be either used to add a styled separator or to add a page break.

Selectors
  • Definitions:

    • paragraph-divider
Style settings

See also: Paragraph, Inline

Setting Type Examples Description
content String "❧" The content of a divider.
Pseudoclasses

See also: Paragraph, Inline

Example
// Replaces a divider by a fleuron and adds a page break
paragraph-divider {
    content:        "❧"
    page-break:     after
}

Block

Block classes are used for any contents grouping multiple paragraphs, such as blockquotes or lists. They provide the same settings as paragraph classes. The top and bottom margins of a block will be applied to its first and last paragraph.

Selectors
  • Definitions:

    • block-quote

    • block-code

    • block-raw

    • block-comment

  • Generic:

    • block-all: Matches any block content. This includes also lists.
  • See also: List

Style settings

See also: Paragraph, Inline

Pseudoclasses

See also: Paragraph, Inline

Example
// Indent all blocks. Increase indenting for nested blocks.
block-all {
    margin-left: 2em
}

List

Lists are special blocks that consists of a list of items. Each item has an enumerator that may be counted. Lists have a special pseudoclass :enumerator that allows the styling of the enumerator of each item.

Selectors
  • Definitions:

    • list-ordered

    • list-unordered

  • Generic:

    • list-all: Matches any list.
Style settings

See also: Block, Paragraph, Inline

Setting Type Examples Description
enumeration-format String %p), %*.%p The format string that should be used for generating an enumerator.
enumeration-style Symbol decimal, lowercase-alpha, uppercase-alpha, lowercase-roman, uppercase-roman The style that should be used for generating an enumerator.
item-spacing Length 0.5em The spacing between two items of the list. (PDF only.)
itemization Symbol itemize, none Specifies whether a list should be treated as ordinary block.
text-inset Length 4em The position of the text inside a text list.
Pseudoclasses

See also: Block, Paragraph, Inline

Class Description
:enumerator The style of the enumerator of a list. See list enumerator.
Example
// Create a text list enumerated with "a), b), c)"
list-ordered {
    item-spacing:       0.5em
    enumeration-format: "%p)"
    enumeration-style:  lowercase-alpha
    text-inset:         3em
}

// Style the enumerator of the list in bold
list-ordered :enumerator {
    font-weight:       bold
}

List enumerator

The style of the enumerator of a list.

Selectors
  • Generic:

    • :enumerator: The style of the enumerator or bullet point of a list. The enumerator class can be utilized by adding the :enumerator pseudo class to any list class (e.g. list-ordered).
Style settings

See also: Inline

Pseudoclasses

See also: Inline

Example
// Create a text list enumerated with "a), b), c)"
list-ordered {
    item-spacing:       0.5em
    enumeration-format: "%p)"
    enumeration-style:  lowercase-alpha
    text-inset:         3em
}

// Style the enumerator of the list in bold
list-ordered :enumerator {
    font-weight:       bold
}

Technical

Technical styles can be used for exporting Ulysses documents with full markup and whitespaces. Besides ulysses-escape, all technical styles are hidden by default.

Selectors
  • Generic:

    • ulysses-tag: The style selector matching all Ulysses tags.

    • ulysses-whitespace: The style selector matching all whitespaces that are typically not exported (e.g. empty lines between paragraphs and lists).

    • ulysses-escape-character: The style selector matching the escape characters “\“.

    • ulysses-escape: The style selector matching an entire escape sequence.

Style settings

See also: Inline

Pseudoclasses

See also: Inline

Example
// Hide tags, escape characters and whitespaces
ulysses-tag {
    visibility: hidden
}

ulysses-escape-character {
    visibility: hidden
}

ulysses-whitespace {
    visibility: hidden
}

Settings Reference

This section gives you a detailed reference on any available style settings. Currently, the following settings exists:

Settings Reference for General Classes

The following reference contains all settings for general classes, i.e. for all style classes concerning general visual settings of the exported document.

Settings for document-settings

The following settings apply to the global definition class document-settings.

column-count

The number of text columns used for output. See also column-spacing-width.

Availability

Available in: document-settings

Type

Number

Default value

1

Inherited

Yes.

Example
document-settings {
    column-count:            2
    column-spacing-width:    1cm
}
column-spacing-width

The spacing between two text columns for multi-column layouts. See also column-count. Will be ignored for single column layouts

Availability

Available in: document-settings

Type

Length

Default value

10pt

Inherited

Yes.

Example
document-settings {
    column-count:            2
    column-spacing-width:    1cm
}
footnote-enumeration

Specifies how to enumerate footnotes.

Availability

Available in: document-settings

Type

Symbol

Available values
Value Description
per-page Reset footnote numbering for each page. Used as default.
per-section Enumerate footnotes per section.
continuous Continuous enumeration in the entire document.
Default value

per-page

Inherited

No.

Example
document-settings {
    footnote-placement:    end-of-section
    footnote-style:        lowercase-alpha
    footnote-enumeration:  continuous
}
footnote-placement

Specifies where to place footnotes in the document.

Compatibility

end-of-page not available in Pages.

Availability

Available in: document-settings

Type

Symbol

Available values
Value Description
end-of-page Place footnotes on the end of each page. Used as default.
end-of-section Place footnotes on the end of each section.
end-of-document Place footnotes on the end of the document. (Creates endnotes in DOCX.)
Default value

end-of-page

Inherited

No.

Example
document-settings {
    footnote-placement:    end-of-section
    footnote-style:        lowercase-alpha
    footnote-enumeration:  continuous
}
footnote-style

The style that should be used for enumerating footnotes.

Availability

Available in: document-settings

Type

Symbol

Available values
Value Description
decimal Use decimal numbers to enumerate footnotes. Used as default.
lowercase-alpha Use lowercase alphabetic characters to enumerate footnotes. (a … z, aa … zz, …)
uppercase-alpha Use uppercase alphabetic characters to enumerate footnotes. (A … Z, AA … ZZ, …)
lowercase-roman Use lowercase roman numerals to enumerate footnotes. (i, ii, iii, iv, v, …)
uppercase-roman Use uppercase roman numerals to enumerate footnotes. (I, II, III, IV, V, …)
chicago-style-manual Enumerate footnotes according the chicago style manual (*, †, ‡, §, **, ††, …)
Default value

decimal

Inherited

No.

Example
document-settings {
    footnote-placement:    end-of-section
    footnote-style:        lowercase-alpha
    footnote-enumeration:  continuous
}
locale

Hyphenation tries to detect the language of a paragraph automatically. However, if the detection fails this locale will be enforced. Defaults to the current system locale. Set to ISO country identifiers.

Availability

Available in: document-settings

Type

String

Default value

System Locale

Inherited

Yes.

page-binding

The position of the page binding. Influences the position of the page-inset-inner and page-inset-outer. If two-sided is enabled, it influences the position of the first page of a section: for left binding, the first page of a section will be a right page. For right binding, it will be a left page. Empty pages will be inserted to ensure the correct position of first pages.

Availability

Available in: document-settings

Type

Symbol

Available values
Value Description
left The page binding is on the left side. On two-sided output, first pages will be on the right side. Used as default.
right The page binding is on the right side. On two-sided output, first pages will be on the left side.
Default value

left

Inherited

Yes.

Example
document-settings {
    page-inset-inner:  4cm
    page-inset-outer:  2cm
    page-binding:      left
    section-break:     heading2
    two-sided:         yes
}
page-height

The height of the page. If not specified, the current page or printer settings will be used.

Availability

Available in: document-settings

Type

Length

Default value

Depends on printer settings.

Inherited

Yes.

page-inset-bottom

The spacing between the bottom border of a page and the page content.

Availability

Available in: document-settings

Type

Length

Default value

2cm

Inherited

Yes.

page-inset-inner

The spacing between the inner border of a page and the page content. If two-sided output is enabled inner and outer margins switch between odd and even pages. For left page-binding the inner margin is left on first pages. For right page-binding it is right on first pages.

Availability

Available in: document-settings

Type

Length

Default value

2cm

Inherited

Yes.

Example
document-settings {
    page-inset-inner:  4cm
    page-inset-outer:  2cm
    page-binding:      left
    two-sided:         yes
}
page-inset-outer

The spacing between the outer border of a page and the page content. If two-sided output is enabled inner and outer margins switch between odd and even pages. For left page-binding the inner margin is right on first pages. For right page-binding it is left on first pages.

Availability

Available in: document-settings

Type

Length

Default value

2cm

Inherited

Yes.

Example
document-settings {
    page-inset-inner:  4cm
    page-inset-outer:  2cm
    page-binding:      left
    two-sided:         yes
}
page-inset-top

The spacing between the top border of a page and the page content.

Availability

Available in: document-settings

Type

Length

Default value

2cm

Inherited

Yes.

page-number-format

The format string that should be used for page numbers. Page numbers can be placed on area-header or area-footer depending on their content setting. Use ‘%p’ as placeholder for page numbers. The actual placeholder content depend on the page-number-style. Use ‘%%’ to generate a single % character.

Availability

Available in: document-settings

Type

String

Default value

%p

Inherited

Yes.

Example
// Show "- 1 -", "- 2 -" in the footer area of a page.
document-settings {
    page-number-format:      "- %p -"
    page-number-style:       decimal
}

area-footer {
    content:         page-number
    text-alignment:  center
}
page-number-reset

Specifies whether page numbers should be reset on each section.

Availability

Available in: document-settings

Type

Symbol

Available values
Value Description
none Continuous page numbering in the entire document.
per-section Reset page numbers on each section.
Default value

none

Inherited

No.

Example
// Show "- 1 -", "- 2 -" in the footer area of a page. Numbers will be reset on each section.
document-settings {
    page-number-format:      "- %p -"
    page-number-style:       decimal
    page-number-reset:       per-section
    section-break:           heading-2
}

area-footer {
    content:         page-number
    text-alignment:  center
}
page-number-style

The style that should be used for generating page numbers. Will be used to fill the placeholder “%p” in page-number-format.

Availability

Available in: document-settings

Type

Symbol

Available values
Value Description
decimal Use decimal numbers to fill the placeholder. Used as default.
lowercase-alpha Use lowercase alphabetic characters to fill the placeholder. (a … z, aa … zz, …)
uppercase-alpha Use uppercase alphabetic characters to fill the placeholder. (A … Z, AA … ZZ, …)
lowercase-roman Use lowercase roman numerals to fill the placeholder. (i, ii, iii, iv, v, …)
uppercase-roman Use uppercase roman numerals to fill the placeholder. (I, II, III, IV, V, …)
Default value

decimal

Inherited

No.

Example
// Show "- 1 -", "- 2 -" in the footer area of a page.
document-settings {
    page-number-format:      "- %p -"
    page-number-style:       decimal
}

area-footer {
    content:         page-number
    text-alignment:  center
}
page-orientation

The orientation of a page. If not specified, the current page or printer settings will be used.

Availability

Available in: document-settings

Type

Symbol

Available values
Value Description
portrait Page is in portrait orientation. Used as default.
landscape Page is in landscape orientation.
Default value

Depends on printer settings.

Inherited

Yes.

page-width

The width of the page. If not specified, the current page or printer settings will be used.

Availability

Available in: document-settings

Type

Length

Default value

Depends on printer settings.

Inherited

Yes.

section-break

Specifies whether headings or dividers will introduce a section break. On two-sided output, an empty page may be placed before a new section to keep the first side of a section on the left or right side of the output. The :first-page header and footer style will be used for all first pages of a section. Depending on the footnote-enumeration setting, the enumeration of footnotes will restart on a section. If a heading level is specified for section breaks, the heading level and all higher levels will insert to a section break (e.g. if heading-3 is specified for section-break, also heading-2 and heading-1 will lead to a section break.)

Availability

Available in: document-settings

Type

Symbol

Available values
Value Description
none No section break. Used as default.
heading-1 Section break on heading1.
heading-2 Section break on heading2 and higher.
heading-3 Section break on heading3 and higher.
heading-4 Section break on heading4 and higher.
heading-5 Section break on heading5 and higher.
heading-6 Section break on heading6 and higher.
paragraph-divider Section breaks on dividers.
Default value

none

Inherited

Yes.

Example
document-settings {
    page-binding:      left
    section-break:     heading2
    two-sided:         yes
}
two-sided

Specifies whether the output should be generated for two-sided printing or not. If two-sided printing is activated, page-inset-inner and page-inset-outer will be switched according to the page-binding. Furthermore, first pages will be forced for placement on the left or right side (see page-binding.

Availability

Available in: document-settings

Type

Boolean

Available values
Value Description
no Single sided output. All pages are treated as first pages. Inner and outer margins are not switched. New sections start on the next page. Used as default.
yes Create two-sided output. Switch inner and outer page inset. Force first pages to be placed on the left / right side accordin to page binding.
Default value

Yes

Inherited

Yes.

Example
document-settings {
    page-inset-inner:  4cm
    page-inset-outer:  2cm
    page-binding:      left
    section-break:     heading2
    two-sided:         yes
}

Settings for Headers and footers

The following settings apply to the global definition class Headers and footers.

bottom-spacing

The spacing on the bottom of a header / footer.

Availability

Available in: Headers and footers

Type

Length

Default value

0pt

Inherited

Yes.

content

The content that should be filled in to the header / footer.

Availability

Available in: Headers and footers

Type

Symbol

Available values
Value Description
none Header/Footer should be empty.
heading Header/Footer should contain the heading of the current section.
page-number Header/Footer should contain the current page number according to the page numbering settings in the document-settings.
Default value

none

Inherited

Yes.

top-spacing

The spacing on the top of a header / footer.

Availability

Available in: Headers and footers

Type

Length

Default value

0pt

Inherited

Yes.

Settings for area-footnotes

The following settings apply to the global definition class area-footnotes.

anchor-alignment

The horizontal alignment of a footnote anchor.

Availability

Available in: area-footnotes

Type

Symbol

Available values
Value Description
left The anchor is left-aligned.
right The anchor is right-aligned.
Default value

left

Inherited

Yes.

anchor-inset

The inset of a footnote anchor inside the footnote area measured from the left page margin.

Availability

Available in: area-footnotes

Type

Length

Default value

10pt

Inherited

Yes.

divider-length

The spacing between the separator line of a footnote and its contents.

Compatibility

PDF only.

Availability

Available in: area-footnotes

Type

Length

Default value

100pt

Inherited

Yes.

divider-position

The horizontal position of the divider line of a footnote.

Availability

Available in: area-footnotes

Type

Symbol

Available values
Value Description
left The divider is aligned to the left page inset.
right The divider is aligned to the left page inset.
Default value

left

Inherited

Yes.

divider-spacing

The spacing between the separator line of a footnote and its contents.

Availability

Available in: area-footnotes

Type

Length

Default value

10pt

Inherited

Yes.

divider-width

The width of the divider line of a footnote.

Compatibility

PDF only.

Availability

Available in: area-footnotes

Type

Length

Default value

1pt

Inherited

Yes.

text-inset

The inset of the text of the footnote area measured from the left page margin.

Availability

Available in: area-footnotes

Type

Length

Default value

30pt

Inherited

Yes.

top-spacing

The spacing before the separator line of a footnote.

Availability

Available in: area-footnotes

Type

Length

Default value

10pt

Inherited

Yes.

Settings Reference for Definition Classes

The following reference contains all settings for definition classes, i.e. for all style classes that can be applied to actual contents of your Ulysses document.

Settings for Inline

The following settings apply to all inline classes and their derived classes.

background-color

The background color of the text. Will only set the color of the text itself. Margins will not be colored.

Compatibility

PDF supports arbitrary colors. Colors will be converted to a predefined 16 color pallette in DOCX.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Color

Available values
Value Description
Color A fixed background color
none Transparent background color.
Default value

rgb(0,0,0)

Inherited

Yes.

Example
inline-mark {
  font-color:       #ffffff
  background-color: #ff0000
}
baseline-shift

The text position relative to the baseline.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Symbol

Available values
Value Description
normal The text is placed on the baseline. Normal font size is used. Default value.
superscript Superscript styling. The text is placed 0.33em above the baseline. The font size is set to 66%.
subscript Subscript styling. The text is placed 0.33em above the baseline. The font size is set to 66%.
Default value

normal

Inherited

Yes.

Example
footnote :anchor {
    baseline-shift:   superscript
}
character-spacing

Additional spacing added to the default spacing of a pair of glyphs of a font.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Length

Default value

normal

Inherited

Yes.

Example
heading-1 {
    font-family:        "Futura"
  character-spacing:  "120%"
}
font-color

The foreground color of the text.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Color

Default value

rgb(0,0,0)

Inherited

Yes.

Example
inline-link {
  font-color:       #0000ff
}
font-family

The family name of a font. You will get a list of all font families installed on your system from the FontBook application.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

String

Default value

"Helvetica"

Inherited

Yes.

Example
inline-code {
  font-family:  "Menlo"
}
font-size

The size of the font used for styling text. The font size will be used as a reference for any relative length of a node (e.g. line-spacing).

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Length

Default value

12pt

Inherited

Yes.

Example
heading-1 {
  font-family:  "Futura"
    font-size:    20pt
}
font-slant

The obliqueness of a font. If the current font-style does not support different font weights, the font-style will be reset to the default setting.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Symbol

Available values
Value Description
normal The normal font slant. Used as default.
italic Specifies an italic or oblique font.
Default value

normal

Inherited

Yes.

Example
inline-emphasis {
    font-slant:  italic
}
font-style

The typographic style of a font. You will get a list of all font styles of a font family installed on your system from the FontBook application. If a font style does not support bold or italic styles, the font-weight and font-slant settings may reset the font style to a regular style.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

String

Default value

"Regular"

Inherited

Yes.

Example
heading-1 {
  font-family:  "Futura"
    font-style:   "UltraLight"
}
font-weight

The weight of a font. If the current font-style does not support different font weights, the font-style will be reset to the default setting.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Symbol

Available values
Value Description
normal The normal font weight. Used as default.
bold The bold font weight.
Default value

normal

Inherited

Yes.

Example
inline-strong {
    font-weight:  bold
}
strikethrough

The strikethrough style of the text.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Symbol

Available values
Value Description
none Text without strikethrough. Default value.
single Single strikethrough.
Default value

none

Inherited

Yes.

Example
inline-delete {
    strikethrough:    single
}
strikethrough-color

The color of the text strikethrough. DOCX always uses the font-color.

Compatibility

PDF only.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Color

Default value

rgb(0,0,0)

Inherited

Yes.

Example
inline-delete {
  strikethrough:        single
  strikethrough-color:  #ff0000
}
style-title

The name of the style used for format templates in DOCX files. Support for localized style names depends on the application and the style name.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

String

Default value

``

Inherited

Yes.

Example
paragraph :first {
  style-title:       "Paragraph (First)"
  first-line-indent: 0pt
}

paragraph {
  style-title:       "Paragraph"
  first-line-indent: 10pt
}
underline

The underline style of the text.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Symbol

Available values
Value Description
none The text should not be underlined. Default value.
single Single underline.
Default value

none

Inherited

Yes.

Example
inline-link {
    underline:    single
}
underline-color

The color of the text underline.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Color

Default value

rgb(0,0,0)

Inherited

Yes.

Example
inline-link {
  underline:        single
  underline-color:  #0000ff
  font-color:       #0000ff
}
visibility

The visibility of an element. Invisible elements will completely ignored. Nested footnotes and elements will not be rendered.

Availability

Available in: Inline, Headers and footers, area-footnotes, Media, Footnotes, Paragraph, Divider, Block, List, List enumerator, Technical

Type

Symbol

Available values
Value Description
hidden The element is hidden. Nested footnotes will be ignored.
visible The element is visible. Used as default.
Default value

none

Inherited

No.

Example
inline-comment {
    visibility:    hidden
}

block-comment {
  visibility:   hidden
}

ulysses-tag {
  visibility:   visible
}

Settings for Media

The following settings apply to all media classes and their derived classes.

margin-left

The left margin of the element.

Compatibility

PDF only.

Availability

Available in: Media

Type

Length

Default value

0pt

Inherited

No.

Example
media-image {
    margin-left:    1em
    margin-right:   1em
}
margin-right

The right margin of the element.

Compatibility

PDF only.

Availability

Available in: Media

Type

Length

Default value

0pt

Inherited

No.

Example
media-image {
    margin-left:     1em
    margin-right:    1em
}

Settings for Footnotes

The following settings apply to all footnotes classes and their derived classes.

footnote-visibility

Specifies whether the element should be actually treated as footnote or as ordinary inline text. Useful to strip annotations from published content.

Availability

Available in: Footnotes

Type

Symbol

Available values
Value Description
visible Style as footnote. Used as default.
hidden Skip any annotated content and treat as ordinary text..
Default value

``

Inherited

Yes.

Example
// Treat annotations as ordinary text
inline-annotation {
    footnote-visibility: hidden
}

Settings for Paragraph

The following settings apply to all paragraph classes and their derived classes.

default-tab-interval

The default length of the spacing between the beginning of two tab stops. Will be used if no tab-positions have been specified.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Length

Default value

40pt

Inherited

Yes.

Example
block-code {
    default-tab-interval:   4em
}
first-line-indent

The indentation of the first line of a paragraph.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Length

Default value

0pt

Inherited

No.

Example
paragraph {
    // Set first line indentation on paragraphs
    first-line-indent:  10pt
}

heading-all + paragraph {
    // No first line indentation after headings
    first-line-indent:  0pt
}
hyphenation

Whether hyphenation shold be applied to a paragraph. Availability of hyphenation depends on the locale support of OS X / iOS.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Boolean

Available values
Value Description
yes Hyphenate words in the paragraph.
no Disable hyphenation in paragraph.
Default value

None.

Inherited

Yes.

Example
// Disable hyphenation for the entire document
defaults {
    hyphenation:    no
}
justify-line-breaks

When text is justified, this setting specifies whether fixed line breaks should be justified or not.

Compatibility

PDF only. Fixed line breaks are always justified when opening DOCX files in Microsoft Word, but not justified in Pages.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Boolean

Available values
Value Description
no Fixed line breaks are not justified. Default.
yes Fixed line breaks are justified.
Default value

no

Inherited

Yes.

Example
paragraph {
    text-alignment:       justified
  justify-line-breaks:  yes
}
keep-with-following

Keep the paragraph with the following paragraphs if a page break occurs. May be used to keep headings together with the first paragraphs of a section.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Boolean

Available values
Value Description
yes The paragraph is kept together with the following paragraph, if a page break occurs.
no The placement of following paragraphs has no influence on the paragraph.
Default value

No

Inherited

Yes.

Example
heading-all {
    keep-with-following:  yes
}
line-height

The distance between the baselines of two adjacent lines of a paragraph. For DOCX export, the line height will be skipped if it contains characters taller than the current line. Negative values will be not allowed in DOCX.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Length

Available values
Value Description
Length Any length value is allowed. Relative values will be based on the current font size. E.g. 200% on a font size of 12pt will result in a 24pt line height.
auto The line height will be determined from the largest element in the line.
Default value

auto

Inherited

Yes.

Example
heading1 {
  font-size:       20pt
  line-height:     120%
}
margin-bottom

The bottom margin of a paragraph. The maximum of the node’s bottom margin, the bottom margins of all parent nodes and the top margins of all succeeding nodes will be used.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Length

Default value

0pt

Inherited

No.

Example
paragraph {
    margin-top:     1em
    margin-bottom:  1em
}
margin-left

The left margin of a paragraph. The margin will be summed up with the left margins of all parent nodes.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Length

Default value

0pt

Inherited

No.

Example
block-quote {
    margin-left:    1em
    margin-right:   1em
}
margin-right

The right margin of a paragraph. The margin will be summed up with the right margins of all parent nodes.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Length

Default value

0pt

Inherited

No.

Example
block-quote {
    margin-left:     1em
    margin-right:    1
}
margin-top

The top margin of a paragraph. The maximum of the node’s top margin, the top margins of all parent nodes and the bottom margins of all preceeding nodes will be used.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Length

Default value

0pt

Inherited

No.

Example
paragraph {
    margin-top:     1em
    margin-bottom:  1em
}
orphans-and-widows

The handling of orphans and widows in paragraphs.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Symbol

Available values
Value Description
allowed Orphans and widows are kept.
prevented Orphans and widows are prevented if possible. Used as default.
Default value

prevented

Inherited

Yes.

Example
block-code {
    orphans-and-widows:   allowed
}
page-break

Specifies, whether a page break should occur before or after a paragraph. If the paragraph is the first paragraph after a page break, this setting is ignored. Same for the last paragraph of a page.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Symbol

Available values
Value Description
none No page break after or before the paragraph. Used as default.
after Page break after the paragraph.
before Page break before the paragraph.
Default value

none

Inherited

Yes.

Example
paragraph-divider {
    page-break:     after
    content:        ""
}
tab-alignments

The horizontal text alignments for each tabulator. See tab-alignments for the text alignment of a tabulator.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Array

Available values
Value Description
left The tabulator is left aligned.
right The tabulator is right aligned. The text is positioned right of the tabulator position.
center The tabulator is centered around the tabulator position.
Default value

None.

Inherited

Yes.

Example
block-code {
    tab-positions:    [4em, 8em, 12em]
    tab-alignments:   [right, left, left]
}
tab-positions

The start positions for each tabulators. Defaults to default-tab-interval if not given. See tab-alignments for the text alignment of a tabulator.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Array

Default value

None.

Inherited

Yes.

Example
block-code {
    tab-positions:    [4em, 8em, 12em, 16em]
    tab-alignments:   [right, left, left, left]
}
text-alignment

The horizontal alignment of a paragraph’s text.

Availability

Available in: Paragraph, Headers and footers, area-footnotes, Divider, Block, List

Type

Symbol

Available values
Value Description
left Text is aligned left. Used as default.
center Text is centered.
right Text is aligned right.
justified Use justified text alignment.
Default value

left

Inherited

Yes.

Example
paragraph {
    text-alignment:   justified
}

heading-all {
    text-alignment:   left
}

Settings for Divider

The following settings apply to all divider classes and their derived classes.

content

The content of a divider.

Availability

Available in: Divider

Type

String

Default value

Empty.

Inherited

Yes.

Example
paragraph-divider {
    content:        "❧"
    page-break:     after
}

Settings for List

The following settings apply to all list classes and their derived classes.

enumeration-format

The format string that should be used for generating an enumerator. ‘%p’ will be filled with the content specified in enumerator-style. ‘%*’ will be replaced with the contents of parent lists. ‘%%’ will be replaced by %.

Availability

Available in: List

Type

String

Default value

%p

Inherited

No.

Example
// Enumerates an unordered list with '-'
list-unordered {
    enumeration-format: "-"
}

// Enumerates an unordered list with '1.', '1.1', '1.1.1' etc.
list-ordered {
    // First level: start with 1., 2., 3.
    enumeration-format: "%p."
}

list-ordered list-ordered {
    // Second level: append 1. with ".1" to 1.1
    enumeration-format: "%*%p"
}

list-ordered list-ordered list-ordered {
    // Third level: append 1.1 with ".1" to 1.1.1
    enumeration-format: "%*.%p"
}
enumeration-style

The style that should be used for generating an enumerator. Will be used to fill the placeholder “%p” in enumerator-format.

Availability

Available in: List

Type

Symbol

Available values
Value Description
decimal Use decimal numbers to fill the placeholder. Used as default.
lowercase-alpha Use lowercase alphabetic characters to fill the placeholder. (a … z, aa … zz, …)
uppercase-alpha Use uppercase alphabetic characters to fill the placeholder. (A … Z, AA … ZZ, …)
lowercase-roman Use lowercase roman numerals to fill the placeholder. (i, ii, iii, iv, v, …)
uppercase-roman Use uppercase roman numerals to fill the placeholder. (I, II, III, IV, V, …)
Default value

decimal

Inherited

No.

Example
// Enumerates an ordered list with 'a)', 'b)'
list-ordered {
    enumeration-style:  lowercase-alpha
    enumeration-format: "%p)"
}
item-spacing

The spacing between two items of a list. Actually, the maximum between the top and bottom margins of the adjacent items and the item spacing will be used.

Compatibility

PDF only.

Availability

Available in: List

Type

Length

Default value

0pt

Inherited

No.

Example
list-ordered {
    item-spacing:   0.5em
}
itemization

Specifies whether a list should be treated as ordinary block. Useful for styles that also export the tags of a Ulysses document, skipping any enumeration.

Availability

Available in: List

Type

Symbol

Available values
Value Description
itemize Should be styled as itemized list. Used as default.
none Should be styles as block.
Default value

itemize

Inherited

No.

Example
list-ordered {
    itemization:    none
}

ulysses-tag {
    visibility:     visible
}
text-inset

The position of the text inside a text list.

Availability

Available in: List

Type

Length

Default value

None.

Inherited

No.

Example
// Enumerates an unordered list with '-'
list-unordered {
    enumeration-format: "-"
    text-inset:         2em
}