Stylus Studio XML Editor

Table of contents

Appendices

7.15 Block and Line-related Properties

Block and Line-related Properties

hyphenation-keep[top]

"hyphenation-keep"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopauto | column | page | inherit
11lefttopInitial: 11lefttopauto
11lefttopApplies to: 11lefttopfo:block
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

auto

No restriction applies. The word may be hyphenated at the end of any region.

column

Both parts of a hyphenated word shall lie within a single column.

page

Both parts of a hyphenated word shall lie within a single page.

Controls whether hyphenation can be performed on the last line that fits in a given reference-area.

hyphenation-ladder-count[top]

"hyphenation-ladder-count"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopno-limit | <number> | inherit
11lefttopInitial: 11lefttopno-limit
11lefttopApplies to: 11lefttopfo:block
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

no-limit

Any number of successive lines may be hyphenated.

<integer>

An integer greater than or equal to 1.

Specifies a limit on the number of successive hyphenated line-areas the formatter may generate in a block-area.

last-line-end-indent[top]

"last-line-end-indent"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<length> | <percentage> | inherit
11lefttopInitial: 11lefttop0pt
11lefttopApplies to: 11lefttopfo:block
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttoprefer to inline-progression-dimension of closest ancestor block-area that is not a line-area
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

<length>

The "last-line-end-indent" is specified as a length.

<percentage>

The "last-line-end-indent" is specified as a percentage of the inline-progression-dimension of the closest ancestor block-area.

Specifies an indent to be applied to the last line-area child of the last block-area generated and returned by the formatting object, and to any line-area generated by the formatting object whose following sibling is a block-area that is not a line-area. It is added to the block's end-edge. Positive values indent the edge, negative values outdent the edge.

line-height[top]

"line-height"

CSS2 Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopnormal | <length> | <number> | <percentage> | <space> | inherit
11lefttopInitial: 11lefttopnormal
11lefttopApplies to: 11lefttopall elements
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttoprefer to the font size of the element itself
11lefttopMedia: 11lefttopvisual

CSS2 Reference: [ "line-height" property ] http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-line-height

Values have the following meanings:

normal

Tells user agents to set the computed value to a "reasonable" value based on the font size of the element. The value has the same meaning as <number>. We recommend a computed value for "normal" between 1.0 to 1.2.

<length>

The box height is set to this length. Negative values are illegal.

<number>

The computed value of the property is this number multiplied by the element's font size. Negative values are illegal. However, the number, not the computed value, is inherited.

<percentage>

The computed value of the property is this percentage multiplied by the element's computed font size. Negative values are illegal.

If the property is set on a block-level element whose content is composed of inline-level elements, it specifies the minimal height of each generated inline box.

If the property is set on an inline-level element, it specifies the exact height of each box generated by the element. (Except for inline replaced elements, where the height of the box is given by the "height" property.)

When an element contains text that is rendered in more than one font, user agents should determine the "line-height" value according to the largest font size.

Generally, when there is only one value of "line-height" for all inline boxes in a paragraph (and no tall images), the above will ensure that baselines of successive lines are exactly "line-height" apart. This is important when columns of text in different fonts have to be aligned, for example in a table.

Note that replaced elements have a "font-size" and a "line-height" property, even if they are not used directly to determine the height of the box. The "font-size" is, however, used to define the "em" and "ex" units, and the "line-height" has a role in the "vertical-align" property.

XSL modifications to the CSS definition:

In XSL the "line-height" property is used in determining the half-leading trait.

XSL adds the following value with the following meaning:

<space>

Specifies the minimum, optimum, and maximum values, the conditionality, and precedence of the "line-height" that is used in determining the half-leading.

Negative values for line-height.minimum, line-height.optimum, and line-height.maximum are invalid and will be interpreted as 0pt.

The line-height.conditionality setting can be used to control the half-leading above the first line or after the last line that is placed in a reference-area.

The line-height.precedence setting can be used to control the merging of the half-leading with other spaces.

If line-height is specified using <length>, <percentage>, or <number>, the formatter shall convert the single value to a space-specifier with the subfields interpreted as follows:

  • line-height.minimum: the resultant computed value (as a length) of the <length>, <percentage>, or <number>.

  • line-height.optimum: the resultant computed value (as a length) of the <length>, <percentage>, or <number>.

  • line-height.maximum: the resultant computed value (as a length) of the <length>, <percentage>, or <number>.

  • line-height.precedence: force.

  • line-height.conditionality: retain

line-height-shift-adjustment[top]

"line-height-shift-adjustment"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopconsider-shifts | disregard-shifts | inherit
11lefttopInitial: 11lefttopconsider-shifts
11lefttopApplies to: 11lefttopfo:block
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

consider-shifts

In determining the line-height, include the adjusted top-edge and bottom-edge of any characters that have a baseline-shift.

disregard-shifts

In determining the line-height, include the unshifted top-edge and bottom-edge of any characters that have a baseline-shift.

This property is used to control whether the line-height is adjusted for content that has a baseline-shift.

NOTE: 

This property can be used to prevent superscript and subscript characters from disrupting the line-spacing.

line-stacking-strategy[top]

"line-stacking-strategy"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopline-height | font-height | max-height | inherit
11lefttopInitial: 11lefttopmax-height
11lefttopApplies to: 11lefttopfo:block
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

line-height

Uses the per-inline-height-rectangle as described in [area-line] .

NOTE: 

This matches CSS's line-height and positioning strategy.

font-height

Uses the nominal-requested-line-rectangle as described in [area-line] .

max-height

Uses the maximal-line-rectangle as described in [area-line] .

Selects the strategy for positioning adjacent lines, relative to each other.

Implementations must support at least the "max-height" and "font-height" values defined in this Recommendation, and may treat "line-height" as if "max-height" had been specified.

linefeed-treatment[top]

"linefeed-treatment"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopignore | preserve | treat-as-space | treat-as-zero-width-space | inherit
11lefttopInitial: 11lefttoptreat-as-space
11lefttopApplies to: 11lefttopsee prose
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

ignore

Specifies that any character flow object whose Unicode code point is U+000A shall be discarded during the refinement process.

preserve

Specifies no special action.

treat-as-space

Specifies that any character flow object whose Unicode code point is U+000A (linefeed) shall be converted during the refinement process into a character flow object whose Unicode code point is U+0020 (space).

treat-as-zero-width-space

Specifies that any character flow object whose Unicode code point is U+000A shall be converted during the refinement process into a character flow object whose Unicode code point is U+200B (zero width space).

NOTE: 

The Unicode Standard recommends that the zero width space is considered a valid line-break point and that if two characters with a zero width space in between are placed on the same line they are placed with no space between them and that if they are placed on two lines no additional glyph area, such as for a hyphen, is created at the line-break.

The "linefeed-treatment" property specifies the treatment of linefeeds (character flow objects whose Unicode code point is U+000A) during the refinement process.

white-space-treatment[top]

"white-space-treatment"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopignore | preserve | ignore-if-before-linefeed | ignore-if-after-linefeed | ignore-if-surrounding-linefeed | inherit
11lefttopInitial: 11lefttopignore-if-surrounding-linefeed
11lefttopApplies to: 11lefttopsee prose
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

ignore

Specifies that any character flow object whose character is classified, before any linefeed-treatment handling is considered, as white space in XML, except for U+000A (linefeed) characters, shall be discarded during the refinement process.

preserve

Specifies that any character flow object whose character is classified, before any linefeed-treatment handling is considered, as white space in XML, except for U+000A (linefeed) characters, shall be converted during the refinement process into a character flow object whose Unicode code point is U+0020 (space).

ignore-if-before-linefeed

Specifies that any character flow object, except for U+000A (linefeed) characters, whose character is classified, before any linefeed-treatment handling is considered, as white space in XML (or any sequence of such character flow objects) that immediately precedes a character flow object whose Unicode code point, before any linefeed-treatment handling is considered, is U+000A (linefeed), shall be discarded during the refinement process.

ignore-if-after-linefeed

Specifies that any character flow object, except for U+000A (linefeed) characters, whose character is classified, before any linefeed-treatment handling is considered, as white space in XML (or any sequence of such character flow objects) that immediately follows a character flow object whose Unicode code point, before any linefeed-treatment handling is considered, is U+000A (linefeed), shall be discarded during the refinement process.

ignore-if-surrounding-linefeed

Specifies that any character flow object, except for U+000A (linefeed) characters, whose character is classified, before any linefeed-treatment handling is considered, as white space in XML (or any sequence of such character flow objects) that immediately precedes or follows a character flow object whose Unicode code point, before any linefeed-treatment handling is considered, is U+000A (linefeed), shall be discarded during the refinement process.

The "white-space-treatment" property specifies the treatment during the refinement process of character flow objects, except for linefeeds, that are classified as white space in XML. This includes U+0020 (space) and other white space characters but excludes U+000A (linefeed). Linefeed treatment is determined by the "linefeed-treatment" property.

text-align[top]

"text-align"

CSS2 Definition: as amended by [http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html#x77]

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopstart | center | end | justify | inside | outside | left | right | <string> | inherit
11lefttopInitial: 11lefttopstart
11lefttopApplies to: 11lefttopblock-level elements
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

CSS2 Reference: [ "text-align" property ] http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-align

This property describes how inline content of a block is aligned. Values have the following meanings:

left
center
right
justify

Left, right, center, and justify text, respectively.

<string>

Specifies a string on which cells in a table column will align (see the section on horizontal alignment in a column for details and an example). This value applies only to table cells. If set on other elements, it will be treated as 'left' or 'right', depending on whether 'direction' is 'ltr', or 'rtl', respectively.

A block of text is a stack of line boxes. In the case of 'left', 'right' and 'center', this property specifies how the inline boxes within each line box align with respect to the line box's left and right sides; alignment is not with respect to the viewport. In the case of 'justify', the UA may stretch the inline boxes in addition to adjusting their positions. (See also 'letter-spacing' and 'word-spacing'.)

NOTE: 

The actual justification algorithm used is user agent and written language dependent.

Conforming user agents may interpret the value 'justify' as 'left' or 'right', depending on whether the element's default writing direction is left-to-right or right-to-left, respectively.

XSL modifications to the CSS definition:

Values have the following meanings:

start

Specifies that the content is to be aligned on the start-edge in the inline-progression-direction.

center

Specifies that the content is to be centered in the inline-progression-direction.

end

Specifies that the content is to be aligned on the end-edge in the inline-progression-direction.

justify

Specifies that the contents is to be expanded to fill the available width in the inline-progression-direction.

The last (or only) line of any block, and any lines in the block ending in U+000A, will be aligned in accordance with the "text-align-last" property value. If such lines are to be justified specify "text-align-last='justify'".

inside

If the page binding edge is on the start-edge, the alignment will be start. If the binding is the end-edge, the alignment will be end. If neither, use start alignment.

outside

If the page binding edge is on the start-edge, the alignment will be end. If the binding is the end-edge, the alignment will be start. If neither, use end alignment.

left

Interpreted as "text-align='start'".

right

Interpreted as "text-align='end'".

<string>

Specifies a string on which content of cells in a table column will align (see the section, in the CSS2 Recommendation, on horizontal alignment in a column for details and an example). This value applies only if the formatting object is a descendant of a table cell. If set on other formatting objects, it will be treated as "start".

This property describes how inline content of a block is aligned. For fo:external-graphic, fo:instream-foreign-object, and fo:table-and-caption it specifies the alignment of other areas as described in the constraint section for these formatting objects.

text-align-last[top]

"text-align-last"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttoprelative | start | center | end | justify | inside | outside | left | right | inherit
11lefttopInitial: 11lefttoprelative
11lefttopApplies to: 11lefttopfo:block
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

relative

If text-align is justify, then the alignment of the last line, and of any line ending in U+000A, will be start. If text-align is not justify, text-align-last will use the value of text-align.

start

Specifies that the content is to be aligned on the start-edge in the inline-progression-direction.

center

Specifies that the contents is to be centered in the inline-progression-direction.

end

Specifies that the content is to be aligned on the end-edge in the inline-progression-direction.

justify

Specifies that the contents is to be expanded to fill the available width in the inline-progression-direction.

inside

If the page binding edge is on the start-edge, the alignment will be start. If the binding is the end-edge, the alignment will be end. If neither, use start-side.

outside

If the page binding edge is on the start-edge, the alignment will be end. If the binding is the end-edge the alignment will be start. If neither, use end alignment.

left

Interpreted as "text-align-last='start'".

right

Interpreted as "text-align-last='end'".

Specifies the alignment of the last line-area child of the last block-area generated and returned by the formatting object, and to any line-area generated by the formatting object whose following sibling is a block-area that is not a line-area, and any lines in the block ending in U+000A.

text-indent[top]

"text-indent"

CSS2 Definition: as amended by [http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html#x76]

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<length> | <percentage> | inherit
11lefttopInitial: 11lefttop0pt
11lefttopApplies to: 11lefttopblock-level elements
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttoprefer to width of containing block
11lefttopMedia: 11lefttopvisual

CSS2 Reference: [ "text-indent" property ] http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-indent

This property specifies the indentation of the first line of text in a block. More precisely, it specifies the indentation of the first box that flows into the block's first line box. The box is indented with respect to the left (or right, for right-to-left layout) edge of the line box. User agents should render this indentation as blank space.

Values have the following meanings:

<length>

The indentation is a fixed length.

<percentage>

The indentation is a percentage of the containing block width

The value of 'text-indent' may be negative, but there may be implementation-specific limits. If the value of 'text-indent' is negative, the value of 'overflow' will affect whether the text is visible.

XSL modifications to the CSS definition:

The "text-indent" property specifies an adjustment to the start-indent of the first child L of the first block-area generated and returned by the formatting object, provided L is a line-area.

A negative value specifies a hanging indent (outdent) on the first line.

white-space-collapse[top]

"white-space-collapse"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopfalse | true | inherit
11lefttopInitial: 11lefttoptrue
11lefttopApplies to: 11lefttopsee prose
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

false

Specifies no special action.

true

Specifies, for any character flow object such that:

  • its character is classified as white space in XML, and

  • it is not, however, a U+000A (linefeed) character, and

  • the immediately preceding flow object is a character flow object with a character classified as white space in XML or the immediately following flow object is a linefeed,

that flow object shall not generate an area.

The "white-space-collapse" property specifies the treatment of consecutive white space during area tree construction. The overall effect of handling the white-space-treatment and linefeed-treatment properties during refinement and the white-space-collapse property during area tree generation is as follows: after refinement, where some white space characters may have been discarded or turned into space characters, all remaining runs of two or more consecutive spaces are replaced by a single space, then any remaining space immediately adjacent to a remaining linefeed is also discarded.

An implementation is free to use any algorithm to achieve an equivalent effect.

wrap-option[top]

"wrap-option"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopno-wrap | wrap | inherit
11lefttopInitial: 11lefttopwrap
11lefttopApplies to: 11lefttopfo:block, fo:inline, fo:page-number, fo:page-number-citation
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

no-wrap

No line-wrapping will be performed.

In the case when lines are longer than the available width of the content-rectangle, the overflow will be treated in accordance with the "overflow" property specified on the reference-area.

wrap

Line-breaking will occur if the line overflows the available block width. No special markers or other treatment will occur.

Specifies how line-wrapping (line-breaking) of the content of the formatting object is to be handled.

Implementations must support the "no-wrap" value, as defined in this Recommendation, when the value of "linefeed-treatment" is "preserve".