[ Pobierz całość w formacie PDF ]
Network performance. CSS provides for compact encodings of how to present
content. Compared to images or audio files, which are often used by authors to
achieve certain rendering effects, style sheets most often decrease the content
27
2 Aug 2002 21:33
Introduction to CSS 2.1
size. Also, fewer network connections have to be opened which further
increases network performance.
Flexibility. CSS can be applied to content in several ways. The key feature is
the ability to cascade style information specified in the default (user agent) style
sheet, user style sheets, linked style sheets, the document head, and in
attributes for the elements forming the document body.
Richness. Providing authors with a rich set of rendering effects increases the
richness of the Web as a medium of expression. Designers have been longing
for functionality commonly found in desktop publishing and slide-show applica-
tions. Some of the requested rendering effects conflict with device indepen-
dence, but CSS 2.1 goes a long way toward granting designers their requests.
Alternative language bindings. The set of CSS properties described in this
specification form a consistent formatting model for visual and aural presenta-
tions. This formatting model can be accessed through the CSS language, but
bindings to other languages are also possible. For example, a JavaScript
program may dynamically change the value of a certain element’s ’color’ prop-
erty.
Accessibility. Several CSS features will make the Web more accessible to
users with disabilities:
Properties to control font appearance allow authors to eliminate inaccessi-
ble bit-mapped text images.
Positioning properties allow authors to eliminate mark-up tricks (e.g., invisi-
ble images) to force layout.
The semantics of !important rules mean that users with particular
presentation requirements can override the author’s style sheets.
The ’inherit’ value for all properties improves cascading generality and
allows for easier and more consistent style tuning.
Improved media support, including media groups and the braille,
embossed, and tty media types, will allow users and authors to tailor pages
to those devices.
Note. For more information about designing accessible documents using CSS
and HTML, see [WAI-PAGEAUTH].
2 Aug 2002 21:33
28
Conformance: requirements and recommendations
3 Conformance: Requirements and Recommen-
dations
Contents
3.1 Definitions
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3.2 Conformance
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3.3 Error conditions .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3.4 The text/css content type
.
.
.
.
.
.
.
.
.
.
.
3
3.1 Definitions
In this section, we begin the formal specification of CSS 2.1, starting with the
contract between authors, users, and implementors.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 (see [RFC2119]).
However, for readability, these words do not appear in all uppercase letters in this
specification.
At times, this specification recommends good practice for authors and user
agents. These recommendations are not normative and conformance with this speci-
fication does not depend on their realization. These recommendations contain the
expression "We recommend ...", "This specification recommends ...", or some similar
wording.
Style sheet
A set of statements that specify presentation of a document.
Style sheets may have three different origins: author [p. 31] , user [p. 31] , and
user agent [p. 31] . The interaction of these sources is described in the section
on cascading and inheritance [p. 73] .
Valid style sheet
The validity of a style sheet depends on the level of CSS used for the style
sheet. All valid CSS1 style sheets are valid CSS 2.1 style sheets, but some
changes from CSS1 mean that a few CSS1 style sheets will have slightly differ-
ent semantics in CSS 2.1. Some features in CSS2 are not part of CSS 2.1, so
not all CSS2 style sheets are valid CSS 2.1 style sheets.
A valid CSS 2.1 style sheet must be written according to the grammar of
CSS 2.1 [p. 281] . Furthermore, it must contain only at-rules, property names,
and property values defined in this specification. An illegal (invalid) at-rule,
property name, or property value is one that is not valid.
29
2 Aug 2002 21:33
29
32
33
3
.
Conformance: requirements and recommendations
Source document
The document to which one or more style sheets refer. This is encoded in some
language that represents the document as a tree of elements [p. 30] . Each
element consists of a name that identifies the type of element, optionally a
[ Pobierz całość w formacie PDF ]