Stylus Studio XML Editor

Table of contents

Appendices

5.4 Simple Property to Trait Mapping

Simple Property to Trait Mapping

The majority of the properties map into traits of the same name. Most of these also simply copy the value from the property. These are classified as "Rendering", "Formatting", "Specification", "Font selection", "Reference", and "Action" in the property table in [prtab2] . For example, the property font-style="italic" is refined into a font-style trait with a value of "italic".

Some traits have a value that is different from the value of the property. These are classified as "Value change" in the property table. For example, the property background-position-horizontal="left" is refined into a background-position-horizontal trait with a value of "0pt". The value mapping for these traits is given below.

Background-position-horizontal and background-position-vertical Properties[top]

Background-position-horizontal and background-position-vertical Properties

A value of "top", "bottom", "left", "right", or "center" is converted to a length as specified in the property definition.

Column-number Property[top]

Column-number Property

If a value has not been specified on a formatting object to which this property applies the initial value is computed as specified in the property definition.

Text-align Property[top]

Text-align Property

A value of "left", or "right" is converted to the writing-mode relative value as specified in the property definition.

Text-align-last Property[top]

Text-align-last Property

A value of "left", or "right" is converted to the writing-mode relative value as specified in the property definition.

z-index Property[top]

z-index Property

The value is converted to one that is absolute; i.e., the refined value is the specified value plus the refined value of z-index of its parent formatting object, if any.