Version 1 (modified by peterc, 10 years ago)
--

Text

Alignment: the 'text-align' property

text-align

Value: left | right | center
Initial: left
Applies to: block-level elements
Inherited: yes
Percentages: N/A

This property affects how inline boxes within a line box are aligned. Values have the following meanings:

left
The row of inline boxes are aligned against the left edge of the line box.
right
The row of inline boxes are aligned against the right edge of the line box.
center
The row of inline boxes are aligned in the centre of the line box.

Note that the 'justify' value is not yet supported in RCSS.

Decoration

Underlining: the 'text-decoration' property

text-decoration

Value: none | underline
Initial: none
Applies to: all elements
Inherited: yes
Percentages: N/A

Values have the following meaning:

none
Any text generated by this element has no additional decoration.
underline
Any text generated by this element has an underline, with a thickness and position specified by the font.

The colour of any decoration is the same as the font colour. Note that 'overline' and 'line-through' is not yet supported in RCSS.

Text shadows: the 'text-shadow' property

Text can have a coloured shadow applied behind it. The shadow is defined by three variables: an offset along x, an offset along y, and a colour.

text-shadow-x, text-shadow-y

Value: <length>
Initial: 0px
Applies to: all elements
Inherited: yes
Percentages: N/A

'text-shadow-x' and 'text-shadow-y' define the horizontal and vertical offset of the shadow from its text. If they are both '0' (the default), then no shadow will be rendered.

text-shadow-color

Value: <color>
Initial: black
Applies to: all elements
Inherited: yes
Percentages: N/A

text-shadow
A shorthand for specifying all three shadow parameters at once.

/* Specify a grey text shadow on primary headings. */
h1
{
    text-shadow: 2px 2px grey;
}

Note that in RCSS you can only specify a single text shadow, and shadow blurring is not yet supported.

Whitespace: the 'white-space' property

white-space

Value: normal | pre | nowrap | pre-wrap | pre-line
Initial: normal
Applies to: block-level elements
Inherited: yes
Percentages: N/A

This property defines how whitespace (any spaces, end-lines, carriage-returns and tabs) are processed in sections of text. Values have the following meanings:

normal
Sequences of whitespace are collapsed down to single spaces. Lines are broken as necessary to fit line boxes. Line breaks in the source are ignored.
pre
Sequences of whitespace are preserved. Lines are only broken where line breaks are present in the source.
nowrap
Sequences of whitespace are collapsed. Lines are not broken.
pre-wrap
Sequences of whitespace are not collapsed. Lines are only broken where line breaks are present in the source.
pre-line
Sequences of whitespace are collapsed. Lines are broken to fit line boxes or where line breaks are present in the source.