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
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
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!
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.
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 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.
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.
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 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...
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.
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 3.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 3.7, “Lists”.
Character that follows the formatted marker string.
Supported values: tab, space, nothing
Supported on elements list and heading.
For more information, see also Section 3.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.
Specifies footnote numbering style for the document.
Supported values: decimal, lower-roman, upper-roman, lower-alpha, upper-alpha, cjk-ideographic, chicago
Supported on element document.
Determines footnote numbering policy.
Supported values: continuous, restartsection
When this is restartsection, footnote numbering will restart at 1 for each section.
Supported on element document.
Determines where footnotes will be collected and displayed.
Supported values: textbottom, sectionbottom, pagebottom, documentbottom
Supported on element document.
Determines tabulator positions, kinds and leaders.
For a detailed description of this proeprty, see Section 3.8, “Tabulators”.