This section lists all properties that are borrowed from the CSS2 specification. Since the specification describes the semantics and values of the properties better and more precise than we probably can, we only list the supported properties at this place and would like to refer you to the CSS2 specification for details.
We'll add comments only for notable differences in the way downCast implements the respective property.
Please note that in several situations, the property's semantics cannot be fully implemented due to limitations that the RTF output format imposes. downCast tries to achieve the best approximation possible in these cases.
The property value auto is not supported except where explicitly stated.
Properties which take a length value must specify a unit, even when the length is 0.
CSS2 shorthand properties are supported.
For calculating absolute values from length specifications using px units, a value of 96ppi is assumed.
Sets the font family, i.e. the font name. This property sets RTF font properties based on a predefined internal config file, stdfonts.config.
Sets the width of the border.
Can be applied to elements table, cell, par, inline
Sets the color of the border.
Can be applied to elements table, cell, par, inline
Sets the border style.
Supported values: none, dotted, dashed, solid, double, groove, ridge, inset, outset
Can be applied to elements table, cell, par, inline
Horizontal text alignment.
Can be applied to element par, heading
First line indent. Can be positive or negative.
Can be applied to element par, heading
List marker numbering style.
Supported values: disc, circle, decimal, decimal-leading-zero, lower-roman, upper-roman, lower-alpha, lower-latin, upper-alpha, upper-latin, hebrew, cjk-ideographic, katakana, katakana-iroha, none
Can be applied to element list, heading
Width resp. height of an element.
Can be applied to elements image, document, textbox, cell, row
Margin of an element.
The value auto is only supported on the table element for left-, right-aligning or centering a table with respect to the containing column.
Can be applied to elements par, inline, cell, textbox, table
Padding of an element.
The value auto is only supported on the table element for left-, right-aligning or centering a table with respect to the containing column.
Can be applied to elements par, inline, cell, textbox, table, but not to row
Additional text property.
Values: line-through, none, underline, ilx-outline, ilx-shadow, ilx-emboss, ilx-engrave
Text underline style.
Supported values:none, solid, double, dotted, thick, dashed, dot-dash, dot-dot-dash, wave
This property is taken from the CSS3 draft, which may change in the future. Use with caution!
Text underline mode.
Supported values:continuous, words
This property is taken from the CSS3 draft, which may change in the future. Use with caution!
Text underline color.
This property is taken from the CSS3 draft, which may change in the future. Use with caution!
Text line through style.
Supported values: none, solid, double
This property is taken from the CSS3 draft, which may change in the future. Use with caution!
Sets font weight.
Supported values: normal, lighter, 100, 200, 300, 400, 500, 600, bold, bolder, 700, 800, 900
Starting from bold in the value enumeration above, the property is translated to "bold text". All other values turn bold off.
Specifies the minimal line height.
When specifying the height in a relative unit (i.e., em, % or ex), the resulting value is interpreted as a minimum line height, with the rendering engine being free to increase that value based on the specific line contents. If you specify an absolute value, it is interpreted as being a definite value, with larger content in that line possibly being clipped.
Sets vertical alignment.
Supported values on the cell element: top, middle, bottom
Supported values on the inline element: baseline, sub, super
Sets the font style.
Supported values: normal, italic, oblique
Values italic and oblique are both translated to the same RTF symbol, \i.
Sets the background color.
Supported on elements par, inline and cell.
Widow/orphan control for calculating page breaks.
Only values 0 (=off) or 2 (=on) are supported. orphans and widows can not be set independently.
Allows or suppresses page breaks inside or after an element.
Supported values: auto, avoid
Supported on element par.
Controls page break algorithm.
Supported values: auto, always, left, right
Supported on element part.
Selects a named @page rule to be applied, see Section 2, “Specifying page sizes”.
Supported on element part only.
Provides hyphenation control.
Supported values: normal, hyphenate
A value of normal suppresses hyphenation as far as possible.
Specifies the spacing between borders of table cells.
Supported on element table.
This property specifies spacing behavior between text characters.
Specifies that an element should be floating to the left or right border or in the center of the current column.
Supported on elements image, par and textbox.
Due to limitations of the destination format RTF, this property is not fully supported.
Specifies whether an element should be in the flow or positioned at a fixed location.
Supported values: static, absolute, fixed
Supported on element textbox.
Due to limitations of the destination format RTF, this property is not fully supported.
Specifies displacement of an element.
Supported on element textbox.
Due to limitations of the destination format RTF, this property can not be supported exactly as described in the CSS2 specification.
Specifies the layer of the element.
Supported on positioned elements textbox and image.
Specifies whether an element should be clear of floats.
Supported on element textbox.
Due to limitations of the destination format RTF, there is only very limited support for this property. Or in other words: It might sometimes work...
Specifies the number of columns in this section.
Supported on element part.
This is a CSS3 Draft property, and therefore prefixed by our vendor-prefix -ilx- . Once the CSS3 draft reaches Recommendation state, you will be able to use the property without prefix.
Specifies the width of columns in this section.
Supported on element part.
This is a CSS3 Draft property, and therefore prefixed by our vendor-prefix -ilx- . Once the CSS3 draft reaches Recommendation state, you will be able to use the property without prefix.
Specifies the padding between columns.
Supported on element part.
This is a CSS3 Draft property, and therefore prefixed by our vendor-prefix -ilx- . Once the CSS3 draft reaches Recommendation state, you will be able to use the property without prefix.
Specifies whether there should be a rule between columns.
The output format RTF does not support specifying a specific rule style. This means that a rule will be present if this property value does not contain the value none .
Supported on element part.
This is a CSS3 Draft property, and therefore prefixed by our vendor-prefix -ilx- . Once the CSS3 draft reaches Recommendation state, you will be able to use the property without prefix.
Specifies the display type. Only inline and block are currently respected, and the semantics of elements defined in the upCast DTD always override any setting of this property. downCast supports two additional values, ilx-internal-block and ilx-internal-inline. These can be used as replacements for block and inline, respectively, to indicate that the specific style should not be used to create a named paragraph or character style in the destination RTF file.
Specified if table elements (cells) should grow horizontally with their contents (auto) or not (fixed).
downCast uses several custom properties for areas where there are no appropriate CSS2 properties defined as of now. These will be described in the following sections.
All custom properties start with the prefix -ilx-, which is built according to the suggested practice of the CSS working group. The three vendor characters stand for infinity-loop extension. Since the leading hyphen-minus is not an allowed identifier start character in CSS1 and CSS2 parsers, to be compatible with existing parsers, you need to quote it in actual stylesheets. So, when writing custom properties, you should use the literal form \-ilx-....
Groups all style entries into the same (nested) list style definition by the specified (arbitrary) integer value; see Section 3.2, “Styling a heading” for more details. Use -ilx-list-level to indicate which level (1-based) within the specified list group this is a definition for.
A format string for the list marker. It must be enclosed in quotes. It may contain arbitrary characters, and may contain placeholders of the form %[0-8] where the numbering of that level in the nested list is inserted. You may also use the placeholder %c ("current") which gets replaced by the level of the list in the tree that specifies this property.
To format a number like "1.1-(a)", the fomat string would be %0.%1-(%2), assuming the levels are outmost, next inner and next inner level.
You cannot specify the numbering style for each level. It is automatically taken from the definition of the list on that specific level you want to use the numbering from.
Supported on elements list and heading.
For more information, see also Section 7, “Lists”.
Specifies the offset of the marker position relative to the left margin of the list item.
Supported on elements list and heading.
Specifies the alignment of the marker relative to its -ilx-marker-offset position.
Supported values: left, center, right
Supported on elements list and heading.
For more information, see also Section 7, “Lists”.
Character that follows the formatted marker string.
Supported values: tab, space, none
Supported on elements list and heading.
For more information, see also Section 7, “Lists”.
font-family to use for the marker string.
This property sets RTF font properties based on a predefined internal config file, stdfonts.config.
Supported on elements list and heading.
For more information, see also Section 7, “Lists”.
font-size to use for the marker string.
Supported on elements list and heading.
For more information, see also Section 7, “Lists”.
Vertical offset for the page header and page footer, respectively.
Supported on element document.
Specifies the logical level a paragraph is in in a RTF document. If not specified, the paragraph is considered body text.
Supported on element heading.
Specifies how a reference to a target should be presented to the user.
Supported values: relpagenumber, pagenumber, number, contextnumber, relnumber, relcontextnumber, numbernotext, contextnumbernotext, relnumbernotext, relcontextnumbernotext
Since this value is translated into Word proprietary field options, you should experiment with the values to find the display format suitable for your specific situation. Applications may interpret the options generated differently.
Supported on element reference.
Set the name of the RTF default font to be used when no specific font selection is available.
Supported on element document.
Determines tabulator positions, kinds and leaders.
For a detailed description of this proeprty, see Section 6, “Tabulators”.
Determines if in the RTF output, the image should be referenced using an INCLUDEPICTURE field or it should be embedded directly in the document.
Supported values: embed, reference
Supported on element image.
Sets a gutter value length in @page rules, see Section 2, “Specifying page sizes”.
Supported in @page rules only.
Determines whether the layout should be two-sided with facing pages (value: true) or single-sided (value: false), see Section 2, “Specifying page sizes”.
Do not use this property, but specify separate @page:left and @page:right rules instead.
Supported on document element only.
Determines whether the page layout should be mirrored between even and odd pages (value: true) or not (value: false), see Section 2, “Specifying page sizes”.
Do not use this property, but specify separate @page:left and @page:right rules instead.
Supported on document element only.
Determines whether footnote markers should be auto-generated.
This may prove useful when you have the pre-processing system generate specially formatted footnote reference characters and do not want the RTF rendering application to insert automatically generated ones. In this case, set this property to suppress.
Supported values: suppress, auto
Supported on document element only.
Determines the following style to be used in the rendering application when hitting Return. The style is identified by its class name. The functionality is equivalent to setting a specified paragraph style as the "next" one in Word's style managing GUI.
Supported values: class name of style with display: block .
Supported only in the external CSS stylesheet and only within the declaration block for a class selector with display: block (so that it is made a Paragraph Style in the RTF).
Determines whether style definitions should be overridden by their definitions in the document's template at loading time. This switch corresponds to Word's "Automatically update styles from template". When none, styles are not automatically updated, but their definitions in the opened document take precedence. When link, styles are updated to their current definitions in the referenced document template.
Supported values: none, link
Supported only in the external CSS stylesheet and only within the declaration block for a class selector with display: block (so that it is made a Paragraph Style in the RTF).