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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

the pseudo-element will behave as if the value were ’inline’.<br />

Note. Other values may be permitted in future <strong>level</strong>s of CSS.<br />

12.2 The ’content’ property<br />

’content’<br />

Value: [ | | | attr(X) | open-quote |<br />

close-quote | no-open-quote | no-close-quote ]+ | inherit<br />

Initial: empty string<br />

Applies to: :before and :after pseudo-elements<br />

Inherited: no<br />

Percentages: N/A<br />

Media: all<br />

This property is used with the :before and :after pseudo-elements to generate<br />

content in a document. Values have the following meanings:<br />

<br />

Text content (see the section on strings [p. 50] ).<br />

<br />

The value is a URI that designates an external resource. If a user agent<br />

cannot support the resource because of the <strong>media</strong> types [p. 77] it supports, it<br />

must ignore the resource. Note. <strong>CSS2</strong> offers no mechanism to change the<br />

size of the embedded object, or to provide a textual description, like the "alt"<br />

or "longdesc" attributes do for images in HTML. This may change in future<br />

<strong>level</strong>s of CSS.<br />

<br />

Counters [p. 47] may be specified with two different functions: ’counter()’ or<br />

’counters()’. The former has two forms: ’counter(name)’ or ’counter(name,<br />

style)’. The generated text is the value of the named counter at this point in<br />

the formatting structure; it is formatted in the indicated style [p. 163]<br />

(’decimal’ by default). The latter function also has two forms: ’counter(name,<br />

string)’ or ’counter(name, string, style)’. The generated text is the value of all<br />

counters with the given name at this point in the formatting structure, separated<br />

by the specified string. The counters are rendered in the indicated style<br />

[p. 163] (’decimal’ by default). See the section on automatic counters and<br />

numbering [p. 160] for more information.<br />

open-quote and close-quote<br />

These values are replaced by the appropriate string from the ’quotes’ property.<br />

no-open-quote and no-close-quote<br />

Inserts nothing (the empty string), but increments (decrements) the <strong>level</strong> of<br />

nesting for quotes.<br />

attr(X)<br />

This function returns as a string the value of attribute X for the subject of the<br />

selector. The string is not parsed by the CSS processor. If the subject of the<br />

selector doesn’t have an attribute X, an empty string is returned. The<br />

case-sensitivity of attribute names depends on the document language.<br />

155

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

Saved successfully!

Ooh no, something went wrong!