Specify measurement units used in the generated HTML.
This applies to font sizes and most of length values (like spacing, margins, paddings etc.),
which are specified as properties of CSS rules
generated directly from the formatting properties of template components and
template formatting styles.
Note: A few length values are always specified in pixels (e.g. border width), because otherwise their effect would be highly unpredictable. |
All values are computed from the corresponding formatting properties specified in templates according to the following formulas (for em and % values correspondingly):
valuetpl / defaultFontSizetpl
(valuetpl / defaultFontSizetpl) * 100
valuetpl |
- | the property value specified in the template |
defaultFontSizetpl |
- | the template default font size, which it is one provided by the default paragraph style in the main template |
Relative units are considered most convenient for viewing HTML documentation in web-browsers. However, there is one problem. According to CSS, the effective value of a CSS property specified in relative units is actually computed against the font size inherited from the parent element where the property is applied. This creates the problem of compounding, which requires special efforts to work around. For more details, see The problem with relative length units. |
px
).
These values are produced from the corresponding formatting properties specified in templates according to the formula:
(valuetpl / defaultFontSizetpl) * baseFontSizepx
valuetpl |
- | the property value specified in the template |
defaultFontSizetpl |
- | the template default font size, which it is one provided by the default paragraph style in the main template |
baseFontSizepx |
- | the value of "Units | Base font size" option for pixels |
pt
).
These values are produced from the corresponding formatting properties specified in templates, which are typically set in points too. But the point values that get in the generated HTML (i.e. CSS rules) are not exactly the same as those specified in templates. Rather, they are computed according to the formula:
(valuetpl / defaultFontSizetpl) * baseFontSizept
valuetpl |
- | the property value specified in the template |
defaultFontSizetpl |
- | the template default font size, which it is one provided by the default paragraph style in the main template |
baseFontSizept |
- | the value of "Units | Base font size" option for points |