22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT<br />

will be broken into several lines. The first<br />

line will be identified by a fictional tag<br />

sequence. The other lines will be treated as<br />

ordinary lines in the paragraph.<br />

might be "rewritten" by user agents to include the fictional tag sequence for<br />

:first-line. This fictional tag sequence helps to show how properties are inherited.<br />

This is a somewhat long HTML<br />

paragraph that will be broken into several<br />

lines. The first line will be identified<br />

by a fictional tag sequence. The other lines<br />

will be treated as ordinary lines in the<br />

paragraph.<br />

If a pseudo-element breaks up a real element, the desired effect can often be<br />

described by a fictional tag sequence that closes and then re-opens the element.<br />

Thus, if we mark up the previous paragraph with a SPAN element:<br />

This is a somewhat long HTML<br />

paragraph that will be broken into several<br />

lines. The first line will be identified<br />

by a fictional tag sequence. The other lines<br />

will be treated as ordinary lines in the<br />

paragraph.<br />

the user agent could generate the appropriate start and end tags for SPAN when<br />

inserting the fictional tag sequence for :first-line.<br />

This is a<br />

somewhat long HTML<br />

paragraph that will be<br />

broken into several<br />

lines. The first line will be identified<br />

by a fictional tag sequence. The other lines<br />

will be treated as ordinary lines in the<br />

paragraph.<br />

The :first-line pseudo-element can only be attached to a block-<strong>level</strong> element.<br />

The :first-line pseudo-element is similar to an inline-<strong>level</strong> element, but with<br />

certain restrictions. Only the following properties apply to a :first-line<br />

pseudo-element: font properties, [p. 198] color properties, [p. 187] background<br />

properties, [p. 188] ’word-spacing’, ’letter-spacing’, ’text-decoration’, ’vertical-align’,<br />

’text-transform’, ’line-height’, ’text-shadow’, and ’clear’.<br />

5.12.2 The :first-letter pseudo-element<br />

The :first-letter pseudo-element may be used for "initial caps" and "drop caps",<br />

which are common typographical effects. This type of initial letter is similar to an<br />

inline-<strong>level</strong> element if its ’float’ property is ’none’, otherwise it is similar to a<br />

floated element.<br />

These are the properties that apply to :first-letter pseudo-elements: font properties,<br />

[p. 198] color properties, [p. 187] background properties, [p. 188]<br />

’text-decoration’, ’vertical-align’ (only if ’float’ is ’none’), ’text-transform’,<br />

’line-height’, margin properties, [p. 85] padding properties, [p. 87] border properties,<br />

[p. 88] ’float’, ’text-shadow’, and ’clear’.<br />

66

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!