Appendix C. Changes

Contents

This appendix is informative, not normative.

CSS 2.1 is an updated revision of CSS2. The changes between the CSS2 specification (see [CSS2]) and this specification fall into five groups: known errors, typographical errors, clarifications, changes and additions. Typographical errors are not listed here.

This chapter is not a complete list of changes. Minor editorial changes and most changes to examples are also not listed here.

C.1 Additional property values

C.1.1 Section 4.3.5 Colors

New color value: 'orange'

C.1.2 Section 9.2.4 The 'display' property

New 'display' value: 'inline-block'

C.1.3 Section 12.2 The 'content' property

New 'content' values 'none' and 'normal'. (The values 'none' and 'normal' are equivalent in CSS 2.1, but may have different functions in CSS3.)

C.1.4 Section 18.1 Cursors: the 'cursor' property

New 'cursor' value: 'progress'

C.1.5 Section 16.6 Whitespace: the 'white-space' property

New 'white-space' values: 'pre-wrap' and 'pre-line'

C.2 Changes

C.2.1 Section 1.1 CSS 2.1 vs CSS 2

This new section is added to explain the motivation for CSS2.1 and its relation to CSS2.

C.2.2 Section 1.2 Reading the specification

This section (formerly Section 1.1) has been marked non-normative.

C.2.3 Section 1.3 How the specification is organized

This section (formerly Section 1.2) has been marked non-normative.

C.2.4 Section 1.4.2.1 Value

This section (formerly unnumbered under 1.3.2) notes that value types are specified in terms of tokens and that spaces may appear between tokens in values. A note explains that spaces are required between some tokens.

C.2.5 Section 1.4.2.6 Media groups

This section (formerly unnumbered under 1.3.2) now declares the Media line in property definitions to be non-normative.

C.2.6 Section 1.4.2.7 Computed value

A new line is added to each property definition specifying what the computed values are for the property. (This defines what level of computation is done to a property value before inheritance and before certain other calculations.)

C.2.7 Section 1.4.4 Notes and examples

This section (formerly 1.3.4) now specifies that HTML examples lacking DOCTYPE declarations are SGML Text Entities conforming to the HTML 4.01 Strict DTD [HTML4]. The markup for many examples has been reformulated to either include a DOCTYPE or conform to this definition.

C.2.8 Section 1.5 Acknowledgements

This section (formerly 1.4) has been updated to reflect contributions to CSS2.1 and has been marked non-normative.

C.2.9 Section 3.2 Conformance

Support for user style sheets is now required (in most cases), rather than just recommended.

Support for turning of author style sheets is now required.

Application of CSS properties to form controls is explicitly undefined. Authors are recommended to treat form control styling capabilities in UAs as experimental.

C.2.10 Section 3.3 Error Conditions

This section changed to say that error handling is specified in most cases.

C.2.11 Section 6.1 Specified, computed, and actual values

Redefined "computed value" and created the concept of "used value" so that inheritance can be performed without laying out the document. This change has the effect of allowing (requiring) percentages to be inherited as percentages and affects many other layout calculations throughout the spec.

Since computed value of a property can now also be a percentage. In particular, the following properties now inherit the percentage if the specified value is a percentage:

Note that only 'text-indent' inherits by default, the others only inherit if the 'inherit' keyword is specified.

C.2.12 Section 6.4.1 Cascading order

Changed suggestion that user be able to turn off author styles to a requirement.

C.2.13 Section 6.4.3 Calculating a selector's specificity

The "style" attribute now has a higher specificity than any style rule.

Pseudo-elements are now counted with elements in calculating a a selector's specificity.

C.2.14 Section 6.4.4 Precedence of non-CSS presentational hints

"Non-CSS presentational hints" no longer exist, with the exception of a small set of attributes in HTML.

C.2.15 Section 7.3 Recognized Media Types

Added 'speech' media type.

Marked "Media" field in property descriptions informative.

C.2.16 Section 7.3.1 Media Groups

Marked this section informative.

Added sound to 'handheld' in media type/media group table.

Changed 'tactile' to be both 'static' and 'interactive'.

C.2.17 Section 8.3 Margin properties

If the containing block's width depends on an element with percentage margins, then the resulting layout is undefined in CSS 2.1.

C.2.18 Section 8.3.1 Collapsing margins

In the definition of "collapsing margins", added "non-empty content" and "clearance" to the parenthetical list of things that prevent consecutive margins from being adjoining.

Vertical margins of elements with 'overflow' other than 'visible' no longer collapse with their in-flow children.

Defined how margins collapse through an element with adjoining top and bottom margins.

Added that margins of the root element's box do not collapse.

More rigorously defined "adjoining" for margin collapsing.

C.2.19 Section 8.4 Padding properties

If the containing block's width depends on an element with percentage padding, then the resulting layout is undefined in CSS 2.1.

C.2.20 Section 8.5.2 Border color

'transparent' can now be specified independently for each border side, on par with <color>.

C.2.21 Section 8.5.3 Border style

3D border styles ('groove', 'ridge', 'inset', 'outset') now depend on the corresponding border-color rather than on 'color'.

C.2.22 Section 8.6 The box model for inline elements in bidirection context

Added this new section to specify layout of inline boxes when affected by bidi.

C.2.23 Chapter 9 Visual formatting model

The value 'compact' for 'display' does not exist in CSS 2.1.

C.2.24 Section 10.3.7 Absolutely positioned, non-replaced elements

Absolutely positioned elements can now "shrink-wrap" their contents:

When both 'width' and 'right' (or 'width' and 'left') are 'auto', the element's computed width is the width of the contents (using an algorithm similar to that for table cells) and then 'right' (or 'left') is solved for. CSS2 incorrectly said that 'right' (or 'left') was set to 0 in that case, and then width was solved for.

C.2.25 Section 10.6.4 Absolutely positioned, non-replaced elements

Like normal-flow block-level elements, absolutely positioned elements by default take on the height of their contents ("shrink-wrap"). If 'height' and 'bottom' are both 'auto', the computed value of 'height' is set to the height of the contents and then 'bottom' is solved. CSS2 incorrectly said the reverse: 'bottom' was set to 0 and then height was solved.

C.2.26 Section 11.1.2 Clipping: the 'clip' property

While CSS2 specified that values of "rect()" give offsets from the respective sides of the box, current implementations interpret values with respect to the top and left edges for all four values (top, right, bottom, and left). This is now the specified interpretation.

C.2.27 Chapter 12 Generated content, automatic numbering, and lists

Moved all discussion of aural rendering to Appendix A.

C.2.28 Section 12.1 The :before and :after pseudo-elements

Removed restrictions on which properties and property values are allowed on ':before' and ':after' pseudo-elements.

C.2.29 Section 12.2 The 'content' property

The 'content' property now distinguishes between the empty string, which creates an empty box; and 'normal'/'none', which create no box at all. (There is no distinction between 'normal' and 'none' in level 2.)

A UA is now allowed to report a URI that fails to download.

Removed recommendation to authors to put rules with media-sensitive 'content' properties inside '@media'.

Whether '\A' escapes in generated content create line breaks is now subject to the 'white-space' property.

The former section 12.3 on interaction between ':before', ':after' and elements with 'display: compact' or 'display: run-in' has been removed. (The interaction is already fully defined, because generated content consists of boxes in the tree, no different from other boxes.)

C.2.30 Section 12.3.2 Inserting quotes with the 'content' property

Specified that extra 'close-quote's (those without a matching 'open-quote' or 'no-open-quote') are not rendered, and that neither 'close-quote' nor 'no-close-quote' cause the quoting depth to be negative.

C.2.31 Section 12.4 Automatic counters and numbering

Defined what a rule with duplicate counters, such as 'counter-reset: section 2 section', means.

C.2.32 Section 12.4.1 Nested counters and scope

The scope of a counter no longer defaults to the whole document, but starts at the first element that uses the counter. (This affects counters that are used without a prior 'counter-reset' to set the scope explicitly.)

C.2.33 Section 12.5 Lists

Removed text in section 12.5 (formerly 12.6) relating to the 'marker' display value.

Removed the 'marker-offset' property (and thus former section 12.6.1).

C.2.34 Section 12.5.1 Lists

The list styles 'hebrew', 'armenian', 'georgian', 'cjk-ideographs', 'hiragana', 'katakana', 'hiragana-iroha' and 'katakana-iroha' have been removed due to lack of implementation experience. (They are expected to return in the CSS3 Lists module.)

Removed the sentence that said that an unknown value for 'list-style-type' should cause the value 'decimal' to be used instead. Instead, normal parsing rules apply and cause the rule to be ignored.

C.2.35 Section 14.2.1 Background properties

For 'background-position', the restriction that keywords cannot be combined with percentage or length values is removed. I.e., a value like: '25% top' is now allowed. Also, 'background-position' now applies to all elements, not just to block-level and replaced elements.

User agents are no longer allowed to treat a value of 'fixed' for 'background-attachment' as 'scroll'. Instead they must ignore all such declarations as if 'fixed' were an invalid value.

C.2.36 Section 14.3 Gamma correction

The contents of this section is now a non-normative note.

C.2.37 Chapter 15 Fonts

The 'font-stretch' and 'font-size-adjust' properties have been removed in CSS 2.1.

Font descriptors, the '@font-face' declaration, and all associated parts of the font matching algorithm have been removed in CSS 2.1.

C.2.38 Section 15.2 Font matching algorithm

In this section (previously 15.5), in step 5 (prevously 8) of the font matching algorith, the UA is now allowed to use multiple default fallback fonts to find a glyph for a given character.

In the per-property rule 2, specified that if there is only a small-caps font in a given family, then that font will be selected by 'normal'.

C.2.39 Section 15.2.2 Font family

The "missing character" glyph is no longer considered a match for the last font in a font set, but is now considered a match for U+FFFD.

Certain punctuation characters when appearing in unquoted font family names are now required to be escaped.

C.2.40 Section 15.5 Small-caps

The 'font-variant' property's effect is no longer restricted to bicameral scripts.

C.2.41 Section 15.6 Font boldness

The computed value of 'font-weight' has been defined more precisely such that the 'bolder' and 'lighter' values have an appropriate effect when inheriting through elements with different font-families.

C.2.42 Section 15.7 Font size

Removed suggestion of 1.2 fixed ratio between keyword font sizes in favor of notes recommending a variable ratio and a smallest font-size no less than 9 pixels per EM unit.

Added table mapping CSS font-size keywords to HTML font size numbers.

C.2.43 Chapter 17 Tables

Moved all discussion of aural rendering and related properties to Appendix A.

Updated prose s appropriate to use the terms "specified", "computed" and "used" for values discussed.

C.2.44 17.2 The CSS table model

Defined handling of multiple 'table-header-group' and 'table-footer-group' elements.

UAs are no longer allowed to ignore the table display values on arbitrary HTML elements, only on HTML table elements.

C.2.45 Section 17.2.1 Anonymous table objects

Changed rules so that internal table elements without an enclosing 'table' or 'inline-table' box generate an anonymous 'inline-table' rather than an anonymous 'table' when inside a "display: inline" parent element.

The anonymous table object rules now treat anonymous boxes as equal to elements' boxes. Replaced several instances of the term "element" with "box", removed several instances of "(in the document tree)" and clarified that anonymous boxes generated in earlier rules are part of the input to later rules. Also replaced the term "object" with "box", as is used throughout the rest of the specification.

HTML UAs are no longer exempt from the anonymous box generation rules.

C.2.46 Section 17.4 Tables in the visual formatting model

The relationship of the caption box, table box, and outer anonymous table box has been changed as follows:

C.2.47 Section 17.4.1 Caption position and alignment

The 'left' and 'right' values on 'caption-side' have been removed.

C.2.48 Section 17.5 Visual layout of table contents

Changed rule 5 in grid layout rules to allow overlapping of table cells instead of leaving skipping a gap in the grid to avoid overlap.

C.2.49 Section 17.5.1 Table layers and transparency

In point 6, changed 'These "empty" cells are transparent' to:

If the value of their 'empty-cells' property is 'hide' these "empty" cells are transparent through the cell, row, row group, column, and column group backgrounds, letting the table background show through.

C.2.50 Section 17.5.2.1 Fixed table layout

Specified that in fixed table layout, extra columns in rows after the first must not be rendered.

C.2.51 Section 17.5.2.2 Automatic table layout

Restricted inputs to the table layout algorithm for 'table-layout: auto', whether or not the algorithm described in this section is used, to the width of the containing block and the content of, and any CSS properties set on, the table and any of its descendants.

Added rule 4 to include the column group's width in the algorithm for determining column widths.

C.2.52 Section 17.5.3 Table height algorithms

The 'height' property on tables is now treated as a mininimum height; the UA no longer has the option of using 'height' to constrain the size of the table to be smaller than its contents.

Percentage heights on table cells, rows, and row groups now compute to 'auto'.

The baseline of a cell is now defined much more precisely.

Defined the baseline of a row with no baseline-aligned cells.

C.2.53 17.5.4 Horizontal alignment in a column

The <string> value for 'text-align' is not part of CSS 2.1.

C.2.54 Section 17.6 Borders

Several popular browsers assume an initial value for 'border-collapse' of 'separate' rather than 'collapse' or exhibit behavior that is close to that value, even if they do not actually implement the CSS table model. 'Separate' is now the initial value.

C.2.55 Section 17.6.1 The separated borders model

Specified the effect of padding on the table element.

Specified which parts of the table are included in the width measurement.

C.2.56 Section 17.6.1.1 Borders and Backgrounds around empty cells

Refined definition of "empty" when used as a condition for the 'empty-cells' property so that it is not triggered when the cell includes any child elements, even if they are empty.

The 'empty-cells' property now hides both borders and backgrounds, not just borders.

Changed behavior of a row when it collapses due to 'empty-cells': it is no longer treated as "display: none". Instead it is given zero height and its associated border-spacing is eliminated.

C.2.57 Section 17.6.2 The collapsing border model

Specified which part of the table is considered the border are in the collapsed borders model and how its width is calculated. The edges of the box in which the table background is painted is, however left explicitly undefined.

C.2.58 Section 17.6.2.1 Border conflict resolution

Defined in rule 4 what happens when two elements of the same type conflict and their borders have the same width and style.

C.2.59 Section 18.4 Dynamic outlines

Position of outline with respect to the border edge is now only suggested, not required.

Conformant UAs are now allowed to ignore the 'invert' value. In such UAs the initial value of 'outline-color' is the value of the 'color' property.

C.2.60 Chapter 12 Generated content, automatic numbering, and lists

The 'marker' value for 'display' does not exist in CSS 2.1

C.2.61 Chapter 13 Paged media

The 'size', 'marks' and 'page' properties are not in CSS 2.1.

C.2.62 Chapter 16 Text

The 'text-shadow' property is not in CSS 2.1.

C.2.63 Appendix A. Aural style sheets

Chapter 19 on aural style sheets has become appendix A and is not normative in CSS 2.1. Related units (deg, grad, rad, ms, s, Hz, kHz) are also moved to this appendix, as is the 'speak-header' property from the "tables" chapter and other notes on aural table rendering. The 'aural' media type is deprecated in favor of the new 'speech' media type.

C.2.64 Appendix A Section 5 Pause properties

A note has been added to this section (formerly 19.4) about the change in position and behavior of pauses in CSS3 Speech compared to this appendix.

C.2.65 Appendix A Section 6 Cue properties

This section (formerly Section 19.5) now specifies the placement of cues and pauses with respect to the :before and :after pseudo-elements.

C.2.66 Other

The former informative appendix C, "Implementation and performance notes for fonts," is left out of CSS 2.1.

C.3 Errors

C.3.1 Shorthand properties

Shorthand properties take a list of subproperty values or the value 'inherit'. One cannot mix 'inherit' with other subproperty values as it would not be possible to specify the subproperty to which 'inherit' applied. The definitions of a number of shorthand properties did not enforce this rule: 'border-top', 'border-right', 'border-bottom', 'border-left', 'border', 'background', 'font', 'list-style', 'cue', and 'outline'.

C.3.2 Applies to

The "applies to" line of many property definitions has been made more accurate by excluding or including table display types where appropriate.

C.3.3 Section 6.4 The cascade

Removed paragraph about imported style sheets being overridden by rules in the importing style sheet: imported style rules follow the cascade as specified in 6.4.1 Cascading order, exactly as if they were inserted in place of the @import rule.

C.3.4 Section 8.1 Box Dimensions

The definition of "content edge" has been changed to depend on 'width' and 'height' rather than directly on 'rendered content'.

From the definition of "padding edge", deleted the sentence "The padding edge of a box defines the edges of the containing block established by the box." For information about containing blocks, consult Section 10.1.

C.3.5 12.6.2 Lists

Under the 'list-style' property, the example:

ul > ul { list-style: circle outside } /* Any UL child of a UL */

could never match valid HTML markup (since a UL element cannot be a child of another UL element). An LI has been inserted in between.

C.3.6 14.2 The background

Second sentence: "In terms of the box model, 'background' refers to the background of the content and the padding areas" now also mentions the border area. (See also errata to section 8.1 above.) Thus:

In terms of the box model, "background" refers to the background of the content, padding and border areas.

C.3.7 14.2.1 Background properties

Under 'background-image', defined the image tile size used when the background image has intrinsic sizes specified in percentages or no intrinsic size.

Under 'background-repeat', the sentence "All tiling covers the content and padding areas [...]" has been corrected to

"All tiling covers the content, padding and border areas [...]".

Under 'background-attachment', the value 'scroll' is defined to scroll with the "containing block" rather than with the "document". Also the sentence "Even if the image is fixed [...] background or padding area of the element" has been corrected to

Even if the image is fixed, it is still only visible when it is in the background, padding or border area of the element.

C.3.8 Section 15.7 Font size

The statement "Negative values are not allowed" for 'font-size' now applies to percentages as well as lengths.

C.3.9 Section 17.2.1 Anonymous table objects

Added 'table-header-group' and 'table-footer-group' alongside mentions of 'table-row-group' where missing.

Corrected 'caption' to 'table-caption'.

Added missing rule (#3) for 'table-column' boxes.

Added 'table-caption' and 'table-column-group' to list of boxes requiring a 'table' or 'inline-table' parent in rule 4.

Added rules 5 and 6 to generate 'table-row' boxes where necessary for children of 'table'/'inline-table' and 'table-row-group'/'table-header-group'/'table-footer-group' boxes.

C.3.10 Section 17.4 Tables in the visual formatting model

Specified handling of multiple caption boxes.

Specified that the anonymous outer table box is a 'block' box if the table is block-level and an 'inline-block' box if the table is inline-level but that the anonymous outer table box cannot accept run-ins.

C.3.11 Section 17.5 Visual layout of table contents

Correct text that said all internal table elements have padding; change to say that of these only table cells have padding.

The following note:

Note. Table cells may be relatively and absolutely positioned, but this is not recommended: positioning and floating remove a box from the flow, affecting table alignment.

has been amended as follows:

Note. Table cells may be positioned, but this is not recommended: absolute and fixed positioning, as well as floating, remove a box from the flow, affecting table size.

C.3.12 17.5 Visual layout of table contents

Changed:

Like other elements of the document language, internal table elements generate rectangular boxes with content, padding, and borders. They do not have margins, however.

to:

Like other elements of the document language, internal table elements generate rectangular boxes with content and borders. Cells have padding as well. Internal table elements do not have margins.

C.3.13 Section 17.5.1 Table layers and transparency

The rows and columns only cover the whole table in the collapsed borders model, not in the separated borders model.

The points 2, 3, 4 and 5 have been corrected to define the area covered by rows, columns, row groups and column groups and thus the positioning and painting of backgrounds on those elements.

Specify the handling of "missing cells".

C.3.14 Section 17.6.1 The separated borders model

In the image, changed "cell-spacing" to "border-spacing".

C.3.15 Section 18.2

For the 'ButtonHighlight' value, changed the description from "Dark shadow" to "Highlight color".

C.3.16 Section 4.1.1 (and G2)

The underscore character ("_") is allowed in identifiers. The definitions of the lexical macros "nmstart" and "nmchar" now include it.

C.3.17 4.1.3 Characters and case

In the third bullet, added to point 1:

1.with a space (or other whitespace character): "\26 B" ("&B")

the following text: "In this case, user agents should treat a "CR/LF" pair (13/10) as a single whitespace character."

The underscore is allowed in identifiers. Changed "In CSS2, identifiers [...] can contain only the characters [A-Za-z0-9] and ISO 10646 characters 161 and higher, plus the hyphen (-)" to:

In CSS2, identifiers [...] contain only the characters [A-Za-z0-9] and ISO 10646 characters 161 and higher, plus the hyphen (-) and the underscore (_)

C.3.18 Section 4.3 (Double sign problem)

Several values described in subsections of this section incorrectly allowed two "+" or "-" signs at their beginnings.

C.3.19 Section 4.3.2 Lengths

The suggested reference pixel is based on a 96 dpi device, not 90 dpi. The visual angle is thus about 0.0213 degrees instead of 0.0227, and a pixel at arm's length is about 0.26 mm instead of 0.28

C.3.20 Section 4.3.6

Deleted the comments about range restriction after the following examples:

em { color: rgb(255,0,0) }
em { color: rgb(100%, 0%, 0%) }

C.3.21 5.10 Pseudo-elements and pseudo-classes

In the second bullet, the following sentence was incomplete: "The exception is ':first-child', which can be deduced from the document tree." The ':lang()' pseudo-class can be deduced from the document in some cases.

C.3.22 8.2 Example of margins, padding, and borders

The colors in the example HTML did not match the colors in the image.

C.3.23 Section 8.5.2 Border color: 'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color', and 'border-color'

The value 'transparent' is also allowed on 'border-top-color', 'border-right-color', etc. Changed the line "Value: <color> | inherit" to

Value: <color> | transparent | inherit

C.3.24 Section 8.4 Padding properties

The five properties related to padding ('padding', 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left') now say that they don't apply to table rows, row groups, header groups, footer groups, columns, and column groups.

C.3.25 8.5.3 Border style

Changed the sentence "The color of borders drawn for values of 'groove', 'ridge', 'inset', and 'outset' depends on the element's 'color' property" to

The color of borders drawn for values of 'groove', 'ridge', 'inset', and 'outset' should be based on the element's 'border-color' property, but UAs may choose their own algorithm to calculate the actual colors used. For instance, if the 'border-color' has the value 'silver', then a UA could use a gradient of colors from white to dark gray to indicate a sloping border.

C.3.26 Section 8.5.4 Border shorthand properties: 'border-top', 'border-bottom', 'border-right', 'border-left', and 'border'

Changed <'border-top-width'> to <border-width> as the first value option for 'border-top', 'border-right', 'border-bottom', and 'border-left', and changed <'border-style'> to <border-style>. For 'border', changed <'border-width'> to <border-width> and <'border-style'> to <border-style>.

The value 'transparent' is also allowed on 'border-top', 'border-bottom', 'border-right', 'border-left', and 'border'.

Changed the two lines "Value: [ <'border-top-width'> || <'border-style'> || <color> | inherit" to

Value: [ <border-top-width> || <border-style> || [<color> | transparent] | inherit

C.3.27 8.5.4 Border shorthand properties: 'border-top', 'border-bottom', 'border-right', 'border-left', and 'border'

Changed <'border-top-width'> to <border-width> as the first value option for 'border-top', 'border-right', 'border-bottom', and 'border-left', and changed <'border-style'> to <border-style>. For 'border', changed <'border-width'> to <border-width> and <'border-style'> to <border-style>.

C.3.28 Section 9.3.1

The definition of the value 'static' now says that the properties 'top', 'right', 'bottom', and 'left' do not apply.

C.3.29 Section 9.3.2

The properties 'top', 'right', 'bottom', and 'left', incorrectly referred to offsets with respect to a box's content edge. The proper edge is the margin edge. Thus, for 'top', the description now reads: "This property specifies how far a box's top margin edge is offset below the top edge of the box's containing block."

C.3.30 Section 9.4.3

In the first sentence, added to the end of "Once a box has been laid out according to the normal flow" the words "or floated,".

C.3.31 Section 9.7 Relationships between 'display', 'position', and 'float'

If an element floats, the 'display' property is set to a block-level value, but not necessarily 'block'. In bullet 3, changed "Otherwise, if 'float' has a value other than 'none', 'display' is set to 'block' and the box is floated" to a table with the proper computed values.

C.3.32 Section 10.3.2 Inline, replaced elements (and 10.3.4, 10.3.6, and 10.3.8)

Changed:

A specified value of 'auto' for 'width' gives the element's intrinsic width as the computed value.

to:

If 'width' has a specified value of 'auto' and 'height' also has a specified value of 'auto', the element's intrinsic width is the computed value of 'width'. If 'width' has a specified value of 'auto' and 'height' has some other specified value, then the computed value of 'width' is (intrinsic width) * ( (computed height) / (intrinsic height) ).

C.3.33 Section 10.3.3

In the last sentence of the paragraph following the equation ("If the value of 'direction' is 'ltr', this happens to 'margin-left' instead") substituted 'rtl' for 'ltr'.

C.3.34 Section 10.6.2 Inline, replaced elements ... (and 10.6.5)

Changed:

If 'height' is 'auto', the computed value is the intrinsic height.

to:

If 'height' has a specified value of 'auto' and 'width' also has a specified value of 'auto', the element's intrinsic height is the computed value of 'height'. If 'height' has a specified value of 'auto' and 'width' has some other specified value, then the computed value of 'height' is (intrinsic height) * ( (computed width) / (intrinsic width) ).

C.3.35 Section 10.6.3

The height calculation for block-level, non-replaced elements in normal flow, and floating, non-replaced elements was not quite correct. It now takes into account the case when margins do not collapse, due to the presence of a padding or border.

C.3.36 Section 11.1.1

The example of a DIV element containing a BLOCKQUOTE containing another DIV was not rendered correctly. The first style rule applied to both DIVs, so the second DIV box should have been rendered with a red border as well. The second DIV has now been changed to a CITE, which doesn't have a red border.

C.3.37 11.2 Visibility: the 'visibility' property

Changed "initial" and "inherited" to:

Initial: visible
Inherited: yes

This has the same effect as the original definition, but removes the undefined state of the root element (which was a problem for DOM implementations).

C.3.38 Section 15.5

In bullet 2, changed "the UA uses the 'font-family' descriptor" to "the UA uses the 'font-family' property".

In bullet 6, changed "steps 3, 4 and 5" to "steps 2, 3, 4 and 5".

C.3.39 Section 16.6 Whitespace: the 'white-space' property

The 'white-space' property applies to all elements, not just block-level elements.

C.3.40 Section 17.2 The CSS table model

In the definition of table-header-group, changed "footer" to "header" in "Print user agents may repeat footer rows on each page spanned by a table."

C.3.41 Appendix D.2 Lexical scanner

The underscore character ("_") is be allowed in identifiers. The definitions of the lexical macros "nmstart" and "nmchar" have been fixed.

Note that the tokenizer is case-insensitive, so uppercase A-Z is matched as well.

(Same change in section 4.1.1, see above.)

C.4 Clarifications

C.4.1 2.1 A brief CSS 2.1 tutorial for HTML

This section has been marked non-normative.

C.4.2 2.2 A brief CSS 2.1 tutorial for XML

This section has been marked non-normative.

Added a statement about case-sensitivity of selectors for XML.

The specification for the XML style sheet PI was written after CSS2 was finalized. The first line of the full XML example should not have been be <?XML:stylesheet type="text/css" href="bach.css"?>, but

<?xml-stylesheet type="text/css" href="bach.css"?>

C.4.3 Definitions

Added a note to clarify that the deprecated/non-deprecated status of a feature is distinct from its normative/non-normative status.

Under 'document language' clarified that CSS only describes the presentation of a document language, and has no effect on its semantics.

Changed definition of 'replaced element' to "an element whose content is outside the scope of the CSS formatting model" and added further clarifying text. This clarifies that e.g. SVG images embedded in an XML document are also considered replaced elements, not just those linked in from an outside file. Also changed definition of 'rendered content' to be consistent with this clarification.

Added definition for 'ignore'.

Added definition for 'HTML user agent'.

Added definition for 'property'.

C.4.4 Section 4.1.1

DELIM should not have included single or double quote. Refer also to section 4.1.6 on strings, which must have matching single or double quotes around them.

C.4.5 Section 5.5

Near the end of the section, the text 'Note the whitespace on either side of the "*"' was misleading. The note was not meant to imply that whitespace is required on both sides of the "*" (since the grammar does not require it in this case) but that one may use whitespace in this case.

C.4.6 Section 5.9 ID selectors

The word "precedence" in the last but one paragraph should have been "specificity."

C.4.7 Section 5.12.1 The :first-line pseudo-element

Added some clarifications at the end of the section about the fictional tag sequence in the case of nested block-level elements

C.4.8 Section 6.2 Inheritance

Clarified that computed values are inherited (not specified values) and that they become the specified value on the inheritor.

Removed discussion of "default" styles for a document.

C.4.9 Section 6.2.1 The 'inherit' value

Clarify that 'inherit' can be used on properties that are not normally inherited and that when set on the root element, it has the effect of assigning the property's initial value.

C.4.10 Section 6.3 The @import rule

Except @charset from the statement that @imports must precede all other rules.

C.4.11 6.4 The Cascade

Obfuscated note about system settings and UA limitations.

C.4.12 6.4.1 Cascading order

Various editorial changes to clarify sort order.

C.4.13 Section 6.4.3 Calculating a selector's specificity

Added a note:

The specificity is based only on the form of the selector. In particular, a selector of the form "[id=p33]" is counted as an attribute selector (a=0, b=1, c=0), even if the id attribute is defined as an "ID" in the source document's DTD.

C.4.14 Section 7.2.1 The @media rule

Clarify that Style rules outside of @media rules apply to the same media types that the style sheet itself applies to.

C.4.15 Section 7.3 Recognized media types

Added text to clarify that media types are mutually exclusive, but a UA can render simulatenously to canvases with different media types.

C.4.16 Section 7.3.1 Media groups

Split "aural" media group into "audio" and "speech".

C.4.17 Section 8.1 Box dimensions

C.4.18 Section 8.3 Margin properties

Added a sentence to note that vertical margins have no effect on non-replaced inline elements.

C.4.19 Section 8.3.1

Changed "absolute maximum" to "maximum of the absolute values" in sentence about negative margins collapsing.

Added this clarifying note to the first bullet of the explanation of vertical collapsing of margins:

Note. Adjoining boxes may be generated by elements that are not related as siblings or ancestors.

Emphasized that floating elements' margins do not collapse even between a float and its in-flow children.

Emphasized that absolutely positioned elements' margins do not collapse even between the positioned element and its in-flow children.

C.4.20 Section 8.5.3 Border style

Made it unclear whether 'border-style: none' forces a used or computed value of zero for 'border-width'.

C.4.21 Section 9.4.2

The statement "When an inline box is split, margins, borders, and padding have no visual effect where the split occurs." has been generalized. Margins, borders, and padding have no visual effect where one or more splits occur.

C.4.22 Section 9.4.3

Relatively positioned boxes do not always establish new containing blocks. Changed the second paragraph accordingly.

Added clarifying text and an example about the 'left', 'right', 'top' and 'bottom' properties for relative positioning.

C.4.23 Section 9.10

In this sentence of the last paragraph:

Conforming HTML user agents may therefore ignore the 'direction' and 'unicode-bidi' properties in author and user style sheets.

the word "ignore" meant that if a 'unicode-bidi' or 'direction' value conflicts with the HTML 4 "dir" attribute value, then user agents may choose to use the "dir" value rather than the CSS properties.

User agents are not required to support the 'direction' and 'unicode-bidi' properties to conform to CSS2 unless they support bi-directional text rendering (except for the case of HTML 4 as noted above).

The sentence has been rewritten to be clearer.

C.4.24 10.3.3 Block-level, non-replaced elements in normal flow

Added the following note at the end of the section:

Note that 'width' may not be greater than 'max-width' and not less than 'min-width'. In particular, it may not be negative. See the rules in section 10.4 below.

C.4.25 Section 10.5 Content height: the 'height' property

The UA is free to chose the containing block for the root element (see 10.1), therefore this sentence has been added as a suggestion:

A UA may compute a percentage height on the root element relative to the viewport.

C.4.26 Section 10.8.1

Clarified this paragraph:

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.

as follows:

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: 'em' and 'ex' values are relative to values of 'font-size' and percentage values for 'vertical-align' are relative to values of 'line-height'.

Under 'line-height', after the sentence "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," added the following clarification:

The minimum height consist of a minimum height above the block's baseline and a minimum depth below it, exactly as if each line box starts with a zero-width inline box with the block's font and line height properties (what TEX calls a "strut").

C.4.27 Section 11.1

Clarifications to the last two bullets on when overflow may occur:

C.4.28 Section 11.1.1

Removed 'projection' from this sentence under the value 'scroll'

When this value is specified and the target medium is 'print' or 'projection', overflowing content should be printed.

C.4.29 Section 11.1.2

Values of "rect()" should be separated by commas. Thus, the definition of <shape> now starts:

In CSS2, the only valid <shape> value is: rect (<top>, <right>, <bottom>, <left>) ...

Due to this ambiguity, user agents may support separation of offsets in "rect()" with or without commas.

C.4.30 Section 12.1 The :before and :after pseudo-elements

Clarified that :before and :after pseudo-elements interact with other boxes as if they were real elements just inside their associated element.

Noted that the interaction of :before and :after with replaced elements is left undefined for now.

C.4.31 Section 12.2 The 'content' property

Clarified which counters are used for counter() and counters() in case there are multiple counters of the same name.

C.4.32 Section 12.3.2 Inserting quotes with the 'content' property

Removed note about common typographic practices when quotes in different languages are mixed.

C.4.33 Section 12.4 Automatic counters and numbering

In the "self-nesting" behavior of counters, clarified that merely using a counter in a child element doesn't create a new instance of it: only resetting it does.

Clarified that the scope of a counter does not include any elements in the scope of a counter with the same name created by a 'counter-reset' on a later sibling or a later 'counter-reset' on the same element.

Removed sentence about scope of 'counter-increment' without prior 'counter-reset' as that is now defined (differently) under "12.4.1 Nested counters and scope."

C.4.34 Section 12.4.3 Counters in elements with 'display: none'

Clarified that pseudo-elements that generate no boxes also do not increment counters.

C.4.35 Section 14.2 The background

Clarified that the root background image, although painted over the entire canvas, is anchored as if painted only for the root element, and that the root's background is only painted once.

Clarified rules for propagation of background settings on HTML's <body> element to the root.

Added statement about z-index of backgrounds for elements that form a stacking context and referred to z-index property for details.

Added this note after the first paragraph after 'background-attachment':

Note that there is only one viewport per document. I.e., even if an element has a scrolling mechanism (see 'overflow'), a 'fixed' background doesn't move with it.

Definition of 'background-position' has been rewritten as normative rules rather than just examples.

Stated that the tiling and positioning of background images for inline elements is undefined in CSS2.1.

C.4.36 Section 15.1 Fonts Introduction

Drastically shortened introduction.

C.4.37 Section 15.2 Font matching algorithm

In the per-property rule 2, clarified that 'normal' matches the non-small-caps variant (if there is one).

C.4.38 Section 15.2.2 Font family

Removed discussion of font-matching algorithm. (It is already covered in the font-matching algorithm's own section.

Clarified that quoted strings that are the same as a keyword value must be treated as font family names and not as the keyword value (which must be unquoted).

C.4.39 Section 15.3.1 Generic font families

This section, previously section 15.2.6, has been moved but no other change was made.

C.4.40 Section 15.4 Font styling

The text for this section (formerly part of 15.2.3) has been reverted to its CSS1 format.

C.4.41 Section 15.5 Small-caps

The text for this section (formerly part of 15.2.3) has been reverted to its CSS1 format.

Clarified that CSS2.1 cannot select font variants besides small-caps.

Clarified that when "font-variant: small-caps" results in the substitution of full-caps, the behavior is the same as for text-transform.

C.4.42 Section 15.6 Font boldness

The text for this section (formerly part of 15.2.3) has been reverted to its CSS1 format. Also, discussion of font-weight from other parts of the Fonts chapter has been aggregated under this section.

Removed statemnt that says "User agents must map names to values in a way that preserves visual order; a face mapped to a value must not be lighter than faces mapped to lower values." This is otherwise implied by "The only guarantee is that a face of a given value will be no less dark than the faces of lighter values."

C.4.43 Section 15.7 Font size

Clarified relationship of font size to em squares.

Added a totally irrelevant note about font sizes virtual reality scenes.

C.4.44 Section 16.1

Added to:

The value of 'text-indent' may be negative, but there may be implementation-specific limits.

the following clarification: "If the value of 'text-indent' is negative, the value of 'overflow' will affect whether the text is visible."

C.4.45 16.2 Alignment: the 'text-align' property

Changed "double justify" to "justify" under "left, right, center, and justify".

C.4.46 Section 17.1 Introduction to tables

Expanded introduction to include a brief discussion of the two table layout models. Mentioned that the automatic table algorithm is not fully defined in CSS 2.1 but that some implementations have achieved relatively close interoperability.

C.4.47 Section 17.2 The CSS table model

Clarify that all table captions must be rendered if more than one exists.

Specified that replaced elements with table display values are treated as table elements in table layout.

C.4.48 Section 17.2.1 Anonymous table objects

Moved the first bullet text to the prose before the list of generation rules as it is a general statement of what the rules are supposed to accomplish.

C.4.49 Section 17.4 Tables in the visual formatting model

Clarified that "display: table" elements behave as block-level elements and "display: inline-table" elements behave as inline-level elements and not the other way around.

Clarified that 'table-caption' boxes behave as normal block boxes within the outer anonymous table box.

Clarified that percentage 'width' on the table box is relative to the anonymous box's containing block, not the anonymous box itself.

Clarified that the 'position', 'float', 'top', 'right', 'bottom', and 'left' values on the table box are used on the anonymous outer box instead of the table box and that the table box itself uses the initial values of those properties.

C.4.50 Section 17.5 Visual layout of table contents

To remove ambiguity about the position of extent of internal table boxes, the following paragraph was added after point 6:

the edges of the rows, columns, row groups and column groups in the collapsing borders model coincide with the hypothetical grid lines on which the borders of the cells are centered. (And thus, in this model, the rows together exactly cover the table, leaving no gaps; ditto for the columns.) In the separated borders model, the edges coincide with the border edges of cells. (And thus, in this model, there may be gaps between the rows and columns, corresponding to the 'border-spacing' property.)

Changed warning note about positioning of table cells to be more precise about the possibly unintended effects.

C.4.51 Section 17.5.1 Table layers and transparency

At the end of the section added the following paragraph:

Note that if the table has 'border-collapse: separate', the background of the area given by the 'border-spacing' property is always the background of the table element. See 17.6.1

C.4.52 Section 17.5.2 Table width algorithms

Added a paragraph to clarify the interaction of the table width algorithms with the rules in section 10.3 (Calculating widths and margins).

C.4.53 Section 17.5.2.1 Fixed table layout

Explicitly mentioned that the fixed table layout algorithm may be used with the algorithm of section 10.3.3 when 'table-layout' is 'fixed' but 'width' is 'auto'.

C.4.54 Section 17.5.2.2 Automatic table layout

Clarified that UAs can use other algorithms besides the one in this section even if it results in different behavior. Also marked the rest of the section non-normative in accordance with that statement.

C.4.55 Section 17.5.5 Dynamic row and column effects

Clarified that not affecting layout means that 'visibility: collapse' causes the part of row- and column-spanning cells that span into the collapsed row to be clipped.

C.4.56 17.6.1 The separated borders model

Added a note explaining that 'border-spacing' can be used as a substitute for the non-standard 'framespacing' attribute on frameset elements (which are out-of-scope for CSS2.1).

Added clarification about backgrounds: the sentence "This space is filled with the background of the table element" was replaced by:

In this space, the row, column, row group, and column group backgrounds are invisible, allowing the table background to show through.

C.4.57 Borders around empty cells: the 'empty-cells' property

The 'empty-cells' property not only controls the borders, but also the background.

C.4.58 Section 17.6.2 The collapsing borders model

In the sentence after the question, added "and padding-lefti and padding-righti refer to the left (resp., right) padding of cell i."

C.4.59 Section 18.2 System Colors

Noted that system colors are deprecated in CSS3.

C.4.60 Section 18.4 Dynamic outlines

Clarified that outlines do not cause overflow.

Clarified that outlines are only fully connected "if possible".

C.4.61 Section 18.4.1 Outlines and the focus

Clarify that changing outlines in response to focus should not cause a document to reflow.

C.4.62 Section A.3

The parenthetical phrase "somewhat analogous to the 'display' property" was misleading. The 'speak' property resembles 'visibility' in some ways and 'display' in others.

C.4.63 Appendix G.2 Lexical scanner

Removed the following line from the scanner as it does not appear in the grammar:

"@"{ident}              {return ATKEYWORD;}

The DIMEN token is in the scanner to ensure that a number followed by an identifier is read as one token rather than two. This case is considered an error in CSS2.

C.4.64 Appendix E. References

The entry for "[URI]" referred to a draft that has become an RFC. The entry has been changed.