Movatterモバイル変換


[0]ホーム

URL:


previous  next  contents  properties  index  


Appendix C. Changes

Contents

Note: Several sections of this specification have been updated by other specifications. Please, see"Cascading Style Sheets (CSS) — The Official Definition" in the latestCSS Snapshot for a list of specifications and the sections they replace.

The CSS Working Group is also developingCSS level 2 revision 2 (CSS 2.2).

This appendix is informative, not normative.

CSS 2.1 is an updated revision of CSS2. The changes betweenthe CSS2 specification (see[CSS2]) and this specification fall intofive groups:known errors, typographicalerrors,clarifications,changes andadditions.Typographical errors are not listed here.

In addition, this chapter lists theerrata(part 1 andpart 2)that were subsequently applied to CSS 2.1 since it became aCandidate Recommendation in July 2007.

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

C.1Additional property values

C.1.1Section 4.3.6Colors

New color value: 'orange'

C.1.2Section 9.2.4The 'display' property

New 'display' value: 'inline-block'

C.1.3Section 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 differentfunctions in CSS3.)

C.1.4Section 16.6White space: the 'white-space' property

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

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

New 'cursor' value: 'progress'

C.2Changes

C.2.1Section 1.1 CSS 2.1 vs CSS 2

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

C.2.2Section 1.2 Reading the specification

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

C.2.3Section 1.3 How the specification is organized

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

C.2.4Section 1.4.2.1 Value

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

C.2.5Section 1.4.2.6 Media groups

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

C.2.6Section 1.4.2.7 Computed value

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

C.2.7Section 1.4.4 Notes and examples

This section (formerly 1.3.4) now specifies that HTML examples lacking DOCTYPEdeclarations 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 orconform to this definition.

C.2.8Section 1.5 Acknowledgments

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

C.2.9Section 3.2Conformance

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 UAsas experimental.

C.2.10Section 3.3Error Conditions

This section changed to say that error handlingis specifiedin most cases.

C.2.11Section 4.1.1 Tokenization

Added INVALID token and rules for its definition.

An optional hyphen, "-", is now allowed at the beginning of an "ident"for vendor extensions. (See section 4.1.2.1)

The underscore character("_") is allowed in identifiers. The definitions of the lexicalmacros "nmstart" and "nmchar" now include it. See also section4.1.2.1 (Vendor extensions).

The "escape" macro has been modified to allow the escaping of anycharacter except newlines, form feeds, and hex digits (to avoidconflict with Unicode escapes).

Modified "string1" and "string2" macros by defining allowed charactersthrough excluding disallowed characters. This allows invisible ASCIIcharacters to be included in a string.

C.2.12Section 4.1.3Characters and case

Updated prose about identifiers (second bullet point) to match changesin the tokenization (above).

Excluded null (0x0) character from CSS numerical escapes and indicate thatit is undefined in CSS2.1 what happens if such a character is encountered.

Allowed the use of U+FFFD as a replacement for characters outside therange allowed by Unicode.

CSS is no longer case-insensitive, but case-sensitive withexceptions. Changed "All CSS style sheets are case-insensitive, exceptfor parts that are not under the control of CSS" to "All CSS syntax iscase-insensitive within the ASCII range (i.e., [a-z] and [A-Z] areequivalent), except for parts that are not under the control of CSS." See also the change to case-sensitivity of counters in4.3.5.

C.2.13Section 4.2Rules for handling parsing errors

Defined parsing in the cases of Malformed Declarations,Unexpected End of Stylesheet, and Unexpected End of String.

C.2.14Section 4.3Values

Sections 4.3.7 (Angles), 4.3.8 (Times), and 4.3.9 (Frequencies)have been moved to the informative Appendix A.

C.2.15Section 4.3.2Lengths

Added a paragraph on heuristics for finding the x-height of a font.

C.2.16Section 4.3.4URLs and URIs

Updated URI references to RFC3986.

C.2.17Section 4.3.5Counters

Changed "Counters are denoted by identifiers" to "Counters aredenoted bycase-sensitive identifiers" (see also thechange to case-sensitivity in4.1.3).

C.2.18Section 4.3.6Colors

Defined the numeric values corresponding to color keywords insteadof referencing HTML4 for those values.

UAs are now allowed to intelligently map colors outside the gamutinto the gamut instead of simply clipping them into the range of thegamut.

C.2.19Section 4.3.8Unsupported Values

Added this section to recommend that unsupported properties and valuesbe ignored as if they were invalid.

C.2.20Section 4.4CSS style sheet representation

Changed character encoding detection rule 2 to include a BOM andreferred to additional rules below.

Added rule 4 to provide for use of the referring style sheetor document's character encoding.

Added rule 5 to require falling back to UTF-8.

Removed the restriction on using @charset in embedded style sheets.

Allowed a BOM to precede the @charset rule.

Added requirement that @charset rule must be a literal '@charset"...";',not a CSS-syntax equivalent.

Added requirement to support for UTF-8 at minimum.

Specified that any @charset rule not at the beginning of the style sheetmust be ignored.

Removed note on theoretical problem with @charset problem and preciselydefined rules for character encoding detection based on @charset and/or BOM.

Specified that UAs must ignore style sheets in unknown encodings.

C.2.21Section 5.8.1 Matchingattributes and attribute values

BCP 47 replaces RFC 1766.

C.2.22Section 5.8.3 Classselectors

Class selectors are allowed for other formats than HTML.

Added a note about matching classes in formats with multiple classattributes per element. The behavior is non-normative, because, at thetime of writing, there exist no such formats.

C.2.23Section 5.9 IDselectors

Specified how to match elements with two or more ID attributes.

C.2.24Section 5.10Pseudo-elements and pseudo-classes

Removed exception for HTML UAs that allowed them (and only them) toignore ':first-letter' and ':first-line'.

C.2.25Section 5.11.2The link pseudo-classes: :link and :visited

UAs may return a :visited link to :link status at some point. (Thiswas previously a note, but is now normative.)

Added a note about privacy concerns with link pseudo classes andallowed UAs to treat :visited as :link.

C.2.26Section 5.11.4 Thelanguage pseudo-class: :lang

The identifier C in ':lang(C)' need not be a valid language code,but it must not be empty.

C.2.27Section5.12.1 The :first-line pseudo-element

':first-line' also applies to inline blocks, table captions andtable cells. Added a definition of "first formatted line" to make therules about which line is the first line more precise.

UAs are no longer forbidden from applying more properties than thegiven list.

C.2.28Section 5.12.2The :first-letter pseudo-element

More precise definition of first letter. Added rules for caseswhere the first letter is in an inline block or table cell. Addedrules for cases when preceding punctuation is in a different elementfrom the first letter itself.

UAs may apply other properties to first letters than the givenlist.

Unicode character classes Pi and Pf added to the definition ofpunctuation.

C.2.29Section 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 inheritedas percentages and affects many other layout calculations throughout the spec.

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

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

C.2.30Section 6.4.1 Cascading order

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

C.2.31Section 6.4.3Calculating a selector's specificity

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

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

C.2.32Section 6.4.4 Precedenceof non-CSS presentational hints

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

C.2.33Section 7.3Recognized Media Types

Added 'speech' media type.

Marked "Media" field in property descriptions informative.

C.2.34Section 7.3.1Media 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.35Section 8.3 Margin properties

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

C.2.36Section 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 consecutivemargins from being adjoining.

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

Defined how margins collapse through an element with adjoining top andbottom margins.

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

More rigorouslydefined "adjoining" for margin collapsing.

Sixth bullet, second sub-bullet: to find the position of the topborder edge, assume the element has abottom (rather thantop) border.

Margins of relatively positioned elementsdo sometimescollapse.

C.2.37Section 8.4 Padding properties

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

C.2.38Section 8.5.2 Border color

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

C.2.39Section 8.5.3 Border style

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

C.2.40Section 8.6 The box model for inline elements in bidirectional context

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

C.2.41Section 9.1.2Containing blocks

Removed paragraphs about the initial containing block, as this isnow defined differently. (Seechangesto section 10.1.)

C.2.42Section 9.2.1.1Anonymous block boxes

Added a paragraph to define formatting when an inline box containsa block box.

Specified what property values are applied to anonymous boxes.

C.2.43Section 9.2.2.1Anonymous inline boxes

Specified that collapsed white space does not generate anonymousinline boxes.

C.2.44Section 9.2.3Run-in boxes

Changed run-in rules so that a) run-ins that contain blocks become blocksb) run-ins can only run into sibling blocks and c) run-ins cannot run intoother run-ins.

C.2.45Section 9.2.4The 'display' property

The 'marker' and 'compact' values of the 'display' property arenot part of CSS 2.1. Text relating to these values has beenremoved throughout the specification.

Defined the computed value of 'display' as the specified valueexcept for positioned and floating elements and for the root element.The computed value of 'display' for these elements is defined insection 9.7 and is slightlydifferent from the definition in CSS2.

Conforming HTML UAs are no longer allowed to ignore the 'display'property.

C.2.46Section 9.3.1Choosing a positioning scheme

The 'position' property now applies to all elements, includinggenerated content.

The effect of relative positioning on table captions and internaltable elements is undefined in CSS 2.1.

For fixed positioning, introduced a conflict between this sectionand section 10.1 rule 3.Seehowcome [member-only]for rationale.

Forbid UAs from paginating the content of fixed boxes.

UAs are allowed to treat all values of 'position' as 'static' onthe root element.

C.2.47Section 9.3.2Box offsets

Defined computed values of 'top', 'right', 'bottom', 'left' basedon the value of 'position'.

Percentage offsets are no longer undefined for containing blockswithout an explicit height.

C.2.48Section 9.4.1Block formatting contexts

Specified that floats, absolutely positioned elements, inline-blocks,table-cells, table-captions, and elements with 'overflow' other than'visible' establish new block formatting contexts.

In the paragraph about the position of a box's outer edge with respectto its containing block, except boxes that establish a new block formattingcontext, as they may become narrower due to floats.

C.2.49Section 9.4.2Inline formatting context

Specified that the effect of 'justify' on the content of a line boxdoes not affect the contents of inline-table and inline-block boxes.

Empty line boxes are now required to be treated as zero-height andignored in margin collapsing.

C.2.50Section 9.4.3Relative positioning

Added several paragraphs and an example to explain exactly what thecomputed values of relatively-positioned offsets are, how they affecteach other, and what happens when the positioning is overconstrained.(These were not previously defined.)

C.2.51Section 9.5Floats

Floats are no longer required to have an explicit width.

Floats outside of line boxes no longer align to the bottom ofthe preceding block box; it is implied that they are initiallyaligned with their non-floated position.

Specified that "If a shortened line box is too small to contain anyfurther content, then it is shifted downward until either it fits orthere are no more floats present."

Specified that the border box of a table, block-level replaced element,or element in the normal flow that establishes a new block formattingcontext must not overlap any floats in the same block formatting context.

C.2.52Section 9.5.1Positioning the float

The 'float' property now also applies to :before/:after and generatedcontent.

UAs are now allowed to treat all values of float as 'none' on theroot element.

Added to rule 4 prose to define the position of a float when itoccurs between two collapsing margins.

C.2.53Section 9.5.2Controlling flow next to floats

Definedclearance to precisely detail the 'clear' property'seffect on margin collapsing and the block's cleared position.

Added note to explain effect of 'clear' on inline elements sinceCSS1 (but not CSS2 or CSS 2.1) allows 'clear' on inline elements.

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

Changed rules to convert 'display' not always to 'block', butto an appropriate block-level display value as given by a mappingtable.

Added rule 4 to convert root element's 'display' value accordingto the mapping.

C.2.55Section 9.9Layered presentation

Specified that the background and borders of an element that formsa stacking context are behind all of its descendants, altered stackingcontext prose to be more precise, and added a normativeAppendix E: Elaborate description of StackingContexts to be even more precise about the position of borders,backgrounds, and content on the z-axis.

C.2.56Section 9.10Text direction

Conforming UAs are now allowed to not support bidirectional text; inthis case they must ignore the 'direction' and 'unicode-bidi' properties.However since applying bidi can have an effect even when a documentdoes not contain right-to-left characters, UAs that do support bidi areno longer permitted to not apply the algorithm just because the documentlacks right-to-left characters.

Added a paragraph to define precisely how the Unicode bidirectionalalgorithm applies to text in the CSS formatting model and how the CSS'direction' property on blocks maps into the algorithm.

Conforming HTML UAs are no longer exempt from supporting 'direction'and 'unicode-bidi'.

C.2.57Chapter 10Visual formatting model details

Updated prose to use the terms "specified", "computed" and "used"as appropriate when referencing values. This affects many calculationsin this section. (Seechanges to section 6.1.)

C.2.58Section 10.1Definition of "containing block"

In rule 1, defined the initialcontaining block as the viewport for continuous media and the pagearea for paged media. (It was previously undefined.)

In rule 2, defined the page area as the containing block for fixedpositioned elements in paged media.

In rule 4.1, when the containing block of an absolutely-positionedelement is formed by an inline-level element, it is now formed by thatelement's padding edges, not its content edges.

In rule 4, changed the containing block for absolutely positionedelements with only statically positioned elements from the root'scontent box to the initial containing block.

Specified the positioning and breaking behavior of absolutely-positionedelements in paged media.

C.2.59Section 10.2Content width

Declared that if the containing block's width depends on an element'spercentage width, then the resulting layout is undefined in CSS 2.1.

C.2.60Section 10.3Calculating widths and margins

The computed values of 'left' and 'right' for are now defined insection 9.3.2. The value'auto' does not always compute to zero.

Added sections 10.3.9 and 10.3.10 to define calculations for inline blocks.

C.2.61Section 10.3.2Inline, replaced elements

The sizing algorithm for replaced elements now takes into account andattempts to preserve the replaced content's intrinsic ratio. Sizing ofreplaced elements with percentage intrinsic sizes and without intrinsicsizes is now also defined.

The effect of percentage intrinsic widths is now undefined for CSSlevel 2, rather than ignored.

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

Specified that a computed total of the width, padding, and bordersthat is greater than the containing block width causes auto margins tobe treated as zero in the rest of the rules. This avoids 'auto' marginsbeing negative on the start edge.

C.2.63Section 10.3.4Block-level, replaced elements in normal flow

Applied changes to section 10.3.2 and section 10.3.3 to block-levelreplaced elements in normal flow by referring to the calculations inthose sections.

C.2.64Section 10.3.5Floating, non-replaced elements

Defined computations for 'auto' width floats as shrink-to-fit.(Floats were previously required to have fixed widths.)

C.2.65Section 10.3.6Floating, replaced elements

Applied changes to section 10.3.2 to this section by referencingit for 'auto' width calculations.

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

Defined the static position of an element more precisely.

Rewrote constraint rules.

The 'direction' property of the containing block of the staticposition determines which side is clamped to the static position, notthe 'direction' property of the containing block of the absolutelypositioned element.

C.2.67Section 10.3.8Absolutely positioned, replaced elements

In rule 1, applied sizing rules from section 10.3.2.

In rule 2 (formerly rules 2 and 3), referred to new definition of'static position' in section 10.3.7.

Also in rule 2, the 'direction' property of the containing block ofthe static position determines which side is clamped to the staticposition, not the 'direction' property of the containing block of theabsolutely positioned element.

In rule 4 (formerly rule 5), prevented 'auto' left and right marginsin resulting in a negative margin on the start edge.

C.2.68Section 10.4Minimum and maximum widths

Specified that if the containing block's width is negative, theused value of a percentage min/max width is zero.

Specified that if the min/max width is specified in percentages andthe containing block's width depends on this element's width, then theresulting layout is undefined in CSS 2.1.

The UA is no longer allowed to select an arbitrary minimum width.

The used width of replaced elements with an intrinsic ratio and both'width' and 'height' specified as 'auto' is now calculated according toa table designed to preserve the intrinsic ratio as much as possiblewithin the given constraints.

C.2.69Section 10.5Content height

Removed mention of 'line-height' for inline elements since theircontent box height no longer depends on 'line-height'.

Percentage heights on absolutely-positioned elements are no longertreated as 'auto' when the containing block's height is not explicitlyspecified. Added a note to explain why this is possible.

Specified that a percentage height on the root element is relativeto the initial containing block.

C.2.70Section 10.6Calculating heights and margins

The computed values of 'top' and 'bottom' for are now defined insection 9.3.2. The value'auto' does not always compute to zero.

Added section 10.6.6 to cover cases that are no longer covered underthe previous sections.

Added section 10.6.7 to define 'auto' heights for block formattingcontext roots. (Unlike other block boxes, the height of these boxesincreases to accommodate any normal-flow descendant floats.)

C.2.71Section 10.6.1Inline, non-replaced elements

The height of an inline box is no longer given by the 'line-height'property and is now undefined. This section now suggests that theheight of the box can be based on the font.

C.2.72Section 10.6.2Inline replaced elements, block-level replaced elements in normal flow,'inline-block' replaced elements in normal flow and floating replaced elements

The sizing algorithm for replaced elements now takes into account andattempts to preserve the replaced content's intrinsic ratio. Sizing ofreplaced elements with percentage intrinsic sizes and without intrinsicsizes is now also defined.

Specified that for inline elements, the margin box is used when calculatingthe height of the line box.

C.2.73Section 10.6.3Block-level non-replaced elements in normal flow when 'overflow' computesto 'visible'

This section now only applies to elements whose 'overflow' value computesto 'visible'; elements with other values of 'overflow' are discussed in thenew section 10.6.7 ('Auto' heights for block formatting context roots).

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

Defined the static position of an element more precisely.

Rewrote constraint rules.

C.2.75Section 10.6.5Absolutely positioned, replaced elements

In rule 1, applied sizing rules from section 10.6.2.

C.2.76Section 10.7Minimum and maximum heights

Percentage min/max heights on absolutely-positioned elements are nolonger treated as '0'/'none' when the containing block's height is notexplicitly specified. However if the containing block's width dependson an element's percentage width, then the resulting layout is undefinedin CSS 2.1.

The used width of replaced elements with an intrinsic ratio and both'width' and 'height' specified as 'auto' is now calculated according toa table designed to preserve the intrinsic ratio as much as possiblewithin the given constraints.

C.2.77Section 10.8Line height calculations

Added rule 4 to specify that the height of the line box must be atleast as much as that specified by the 'line-height' property on thethis block.

C.2.78Section 10.8.1Leading and half-leading

UAs are no longer permitted to clip content to the line box, andare instead asked to render overlapping boxes in document order.

'line-height' set on a block no longer specifies the minimal heightof each inline box; instead it specifies the minimal height of eachline box. The exact effect of this requirement is expressed in termsof struts; it is affected by vertical-alignment.

Adjusted text to reflect that the content box height of an inlineis no longer dictated by the 'line-height' property.

Since the content box is now defined by the font and not by theline-height, 'text-top' and 'text-bottom' refer to the content areainstead of the font.

Defined 'top' and 'bottom' alignment in terms of aligned subtreesto take into account any protruding descendants.

Defined the baseline of inline tables and inline blocks.

C.2.79Section 11.1Overflow and clipping

Specified that 'overflow' clips to the padding edge.

C.2.80Section 11.1.1Overflow

'projection' media are no longer permitted to print overflowingcontent for 'overflow: scroll'. 'Print' media nowmay, asopposed toshould.

UAs are now required to apply the 'overflow' property set on the rootelement to the viewport. Additionally, HTML UAs must use the 'overflow'property on the HTML BODY element instead if the root element's'overflow' value is 'visible'.

Specified placement of scrollbar in the box model.

The width of any scrollbars is no longer included in the width ofthe containing block. (And consequently, all text in section 10.3 thatsubtracts the scrollbar width from the containing block width has beenremoved.)

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

The 'clip' property now applies only to absolutely positioned elements.Furthermore, it applies to those elements even when their 'overflow' is'visible'.

The default value of 'clip', 'auto', now indicates no clippingrather than clipping to the element's border box.

Values of "rect()" should be separated by commas. UAs arerequired to support this syntax, but may also support a space-separatedsyntax since CSS2 was not clear about this.

While CSS2 specified that values of "rect()" give offsets from therespective sides of the box, current implementations interpret valueswith respect to the top and left edges forall four values(top, right, bottom, and left). This is now the specifiedinterpretation.

C.2.82Section 11.2Visibility

The 'visibility' property is now defined to inherit, and descendantelements can override an ancestor's hidden visibility.

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

Moved all discussion of aural rendering to Appendix A.

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

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

C.2.85Section 12.2 The'content' property

The initial value of 'content' is now 'normal', not the emptystring.

The 'content' property now distinguishes between the empty string,which creates an empty box; and 'normal'/'none', which create no boxat all. (There is no distinction between 'normal' and 'none' inlevel 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 nowsubject 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 beenremoved. (The interaction is already fully defined, because generatedcontent consists of boxes in the tree, no different from other boxes.)

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

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

C.2.87Section 12.4 Automaticcounters and numbering

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

C.2.88Section 12.4.1 Nestedcounters 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 affectscounters that are used without a prior 'counter-reset' to set thescope explicitly.)

C.2.89Section 12.5Lists

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.90Section 12.5.1Lists

The list styles 'hebrew', 'armenian', 'georgian', 'cjk-ideographic','hiragana', 'katakana', 'hiragana-iroha' and 'katakana-iroha' havebeen removed due to lack of implementation experience. (They areexpected 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 beignored.

The size of list style markers without an intrinsic size is nowdefined.

C.2.91Chapter 13 Paged media

The 'size', 'marks', and 'page' properties are not part ofCSS 2.1.

C.2.92Section 13.2.2Page selectors

The requirement for UA's to honor different declarations for:left, :right, and :first pages has been softened to simplifyimplementations: the page area of the :first page may be usedfor :left and :right pages as well.

C.2.93Section 13.3.1Page break properties

UAs are now only required to apply the page break propertiesto block-level elements in the normal flow of the root element,not to other blocks.However, UAs are now permitted to apply theseproperties to elements other than block-level elements.

Defined treatment of margins, borders, and padding when a pagebreak splits a box.

The 'page-break-inside' property no longer inherits.

C.2.94Section 13.3.3Allowed page breaks

The 'page-break-inside' property of all ancestors is checkedfor page-breaking restrictions, not just that of the breakpoint'sparent.

When dropping restrictions to find a page breaking opportunity,rule A is dropped together with B and D rather than together with C.

Removed restriction on breaking within absolutely positioned boxes.

C.2.95Section14.2.1 Background properties

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

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

The size of background images without an intrinsic size is nowdefined.

C.2.96 Section14.3 Gamma correction

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

C.2.97Chapter 15 Fonts

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

Font descriptors, the '@font-face' declaration, and allassociated parts of the font matching algorithm have beenremoved in CSS 2.1.

C.2.98Section 15.2Font matching algorithm

In this section (previously 15.5), in step 5 (previously 8)of the font matching algorithm, the UA is now allowed to usemultiple default fallback fonts to find a glyph for a givencharacter.

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

C.2.99Section 15.2.2 Font family

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

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

C.2.100Section 15.5Small-caps

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

C.2.101Section 15.6Font boldness

The computed value of 'font-weight' has been defined moreprecisely such that the 'bolder' and 'lighter' values have anappropriate effect when inheriting through elements withdifferent font-families.

C.2.102Section 15.7Font size

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

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

C.2.103Chapter 16 Text

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

C.2.104Section 16.2Alignment

The initial value of 'text-align' is no longer UA-defined buta nameless value that acts as 'left' if 'direction' is 'ltr','right' if 'direction' is 'rtl'.

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

For 'text-align', specified that 'justify' is treated as the initialvalue when computed value of 'white-space' is 'pre' or 'pre-line'.

C.2.105Section 16.3.1Underlining, over lining, striking, and blinking

More precisely defined what boxes are affected by text decorationsspecified on a given element.

Specified that underlines, overlines, and line-throughs apply only totext.

Specified that an underline, overline, or line-through applied acrossa line must be at a constant vertical position and with a constantthickness across the entire line.

Specified how text decorations are affected by relative positioningon descendants.

User agents are now allowed to recognize the 'blink' value but notblink, whereas before they were required to ignore the 'blink' valueif they chose not to support blinking text.

Added text to allow older UAs to conform to this section if theyfollow CSS2's 'text-decoration' requirements but not the additionalrequirements in CSS2.1.

C.2.106Section 16.4Letter and word spacing

Support for the various values of 'letter-spacing' and 'word-spacing'is no longer optional.

Specified that word spacing affects each space, non-breaking space,and ideographic space left in the text after white space processingrules have been applied.

C.2.107Section 16.5Capitalization

UAs are no longer allowed to not transform characters for which thereis an appropriate transformation but which are outside of Latin-1.

C.2.108Section 16.6White space

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

"\A" in generated content no longer forces a break for 'normal'and 'nowrap' values of 'white-space'.

Specified that the CSS white space processing model assumes allnewlines have been normalized to line feeds.

Addedsection 16.6.1 to precisely definewhite space handling.

Addedsection 16.6.3 to specify handlingof control and combining characters.

C.2.109Chapter 17Tables

Moved all discussion of aural rendering and related propertiesto Appendix A.

Updated prose to use the terms "specified", "computed" and "used"as appropriate when referencing values. (Seechangesto section 6.1.)

C.2.110Section 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 valueson arbitrary HTML elements, only on HTML table elements.

C.2.111Section 17.2.1Anonymous 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 equalto elements' boxes. Replaced several instances of the term "element" with"box", removed several instances of "(in the document tree)" and clarifiedthat anonymous boxes generated in earlier rules are part of the input tolater rules. Also replaced the term "object" with "box", as is usedthroughout the rest of the specification.

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

C.2.112Section 17.4Tables in the visual formatting model

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

C.2.113Section 17.4.1Caption position and alignment

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

C.2.114Section 17.5Visual layout of table contents

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

C.2.115Section 17.5.1Table 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 backgroundshow through.

C.2.116Section 17.5.2.1Fixed table layout

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

C.2.117Section 17.5.2.2Automatic 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 thewidth of the containing block and the content of, and any CSS propertiesset on, the table and any of its descendants.

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

C.2.118Section 17.5.3Table height algorithms

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

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

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

C.2.119Section 17.5.4Horizontal alignment in a column

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

C.2.120Section 17.6Borders

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

C.2.121Section 17.6.1The separated borders model

Specified the effect of padding on the table element.

Specified which parts of the table are included in the widthmeasurement.

C.2.122Section 17.6.1.1Borders 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 cellincludes 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 zeroheight and its associated border-spacing is eliminated.

C.2.123Section 17.6.2The collapsing border model

The outer half of the table borders no longer lie in the margin area.Specified which part of the table is considered the border arein the collapsed borders model and how its width is calculated.The edges of the box in which the table background is paintedis, however left explicitly undefined.

C.2.124Section 17.6.2.1Border conflict resolution

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

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

The size of cursors without an intrinsic size is now defined.

C.2.126Section 18.4Dynamic outlines

Position of outline with respect to the border edge is nowonly 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 ofthe 'color' property.

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

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

C.2.128Appendix A. Aural stylesheets

Chapter 19 on aural style sheets has become appendix A and is notnormative 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 tablerendering. The 'aural' media type is deprecated in favor of the new'speech' media type.

C.2.129Appendix A Section 5 Pause properties

Changed the initial value of 'pause-before' and 'pause-after' tobe 0 instead of UA-defined.

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

C.2.130Appendix A Section 6 Cue properties

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

C.2.131Appendix A Section 7Mixing properties

The keywords 'mix' and 'repeat' may now appear in either order.

C.2.132Appendix BBibliography

Various references in Appendix B (formerly Appendix E) have beenupdated as appropriate.

Switched [CSS1] from Normative to Informative.

Updated URI reference from [RFC1808] and the draft-fielding-uri-syntax-01.txtto [RFC3986].

Updated HTTP reference from [RFC2068] to [RFC2616].

Removed normative references to [IANA] and [ICC32].

Added normative references to [ICC42], [RFC3986], [RFC2070], [UAAG10].

Added informative references to CSS2, CSS3 Color, CSS3 Lists,Selectors, CSS3 Speech, DOM 3 Core, MathML 2, P3P, RFC1630, SVG 1.1,XHTML 1, XML ID, and XML Namespaces.

Removed informative references to [ISO10179] (DSSSL), [INFINIFONT],[ISO9899] (C), [MONOTYPE], [NEGOT], [OPENTYPE], [PANOSE], [PANOSE2],[POSTSCRIPT], [RFC1866] (HTML 2), [RFC1942] (HTML Tables), [TRUETYPEGX],[W3CStyle].

Updated language tags references from [RFC1766] to [BCP47].

C.2.133 Other

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

C.3Errors

C.3.1 Shorthand properties

Shorthand properties take a list of subproperty valuesorthe value 'inherit'. One cannot mix 'inherit' with other subpropertyvalues as it would not be possible to specify the subproperty to which'inherit' applied. The definitions of a number of shorthand propertiesdid 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 moreaccurate by excluding or including table display types where appropriate.

C.3.3Section 4.1.1 (andG2)

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

Removed "A-Z" from the "nmchar" token: as CSS is case insensitiveanyway, it was redundant.

Corrected "unicode" macro to treat CRLF as a single character.

Corrected "block" production to allow white space between declarations.

In the rule for "any" (in the core syntax), corrected "FUNCTION"to "FUNCTION any* ')'".

C.3.4Section 4.1.3Characters and case

Corrected third paragraph to say that an '@import' rule can only bepreceded by an '@charset' rule or other '@import' rules.

C.3.5Section 4.3 (Double sign problem)

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

C.3.6Section 4.3.2Lengths

Fixed double sign error in definition of <length>.(<number> already has a sign.)

Corrected the suggested reference pixel to be based on a96 dpi device, not 90 dpi. The visual angle isthus about0.0213 degrees instead of 0.0227, and a pixelat arm's length is about0.26 mm instead of 0.28

Corrected last sentence to refer to a unsupportedusedlength, not an unsupported specified length.

C.3.7Section 4.3.3Percentages

Fixed double sign error in definition of <percentage>.(<number> already has a sign.)

C.3.8Section 4.3.4URLs and URIs

Defined escaping requirements in terms of the URI token so thatno escaping requirements are missing from the prose.

Included invalid URIs in last paragraph about URI error handling.

C.3.9Section 4.3.5Counters

Corrected syntax of counter() and counters() notation to allow white spacebetween tokens.

C.3.10Section 4.3.6Colors

Deleted the comments about rangerestriction after the following examples:

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

C.3.11Section 4.3.7Strings

(Formerly section 4.3.10) Corrected text to allow all forms of Unicodeescapes for U+000A, not just the "\A" form, for including newlines instrings.

C.3.12Section 5.10Pseudo-elements and pseudo-classes

In the second bullet, added that the ':lang()' pseudo-class can alsobe deduced from the document in some cases.

C.3.13Section 6.4 The cascade

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

C.3.14Section 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 "Thepadding edge of a box defines the edges of the containing blockestablished by the box." For information about containingblocks, consultSection 10.1.

C.3.15Section 8.2 Example of margins, padding, and borders

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

C.3.16Section 8.5.4Border shorthand properties

Changed various border shorthands' syntax definitions to use the<border-width>, <border-style> and <'border-top-color'>value types as appropriate.

C.3.17Section 9.2.1Block-level elements and block boxes

Excepted table elements from second paragraph about principal blockboxes and their contents.

Corrected sentence to say "either only block boxes or only inlineboxes" instead of "only block boxes".

C.3.18Section 9.3.1Choosing a positioning scheme

In the definition of "position: static", added 'right' and 'bottom'to the sentence saying that 'top' and 'left' do not apply.

C.3.19Section 9.3.2Box offsets

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

Corrected text under property definitions to say that forrelatively-positioned elements, 'top', 'right', 'bottom', and 'left'define the offset from the box's position in the normal flow, notfrom the edges of the containing block. (The previous definitionconflicted with that was further down; since that text is nowredundant, it has been removed.)

C.3.20Section 9.4.1Block formatting contexts

In paragraph about relationship of a box's outer edges to itscontaining block's edges, corrected parenthetical to say thatline boxes, not thecontent area, may shrink dueto floats.

C.3.21Section 9.4.2Inline formatting context

Added "and the presence of floats" to "The width of a line box isdetermined by a containing block".

C.3.22Section 9.4.3Relative positioning

In the first paragraph, added "or floated" to the phrase "laid outaccording to the normal flow" as floated elements can be relativelypositioned but are not part of the normal flow.

C.3.23Section 9.5Floats

Corrected sentence about not enough horizontal room for the floatto say that it is shifted downward until either it fitsor thereare no more floats present.

C.3.24Section 9.5.1Positioning the float

Correct "Applies to" line and prose to say that the 'float' propertycan be set for any element but only applies to elements that are notabsolutely positioned.

C.3.25Section 9.5.2Controlling flow next to floats

Removed sentence saying that 'clear' may only be specified forblock-level elements: it can be specified for any element, it onlyapplies to block-level elements.

C.3.26Section 9.6Absolute positioning

Corrected sentence that said absolutely positioned boxes establisha new containing block for absolutely positioned descendants toexcept fixed positioned descendants.

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

In rule 1, corrected "user agents must ignore 'position' and 'float"to "'position' and 'float' do not apply".

C.3.28Section 9.10Text direction

Corrected note about 'direction' on table column elements to saythat "columns are not the ancestors of the cells in the document tree"rather than saying "columns do not exist in the document tree".

Added table cells, table captions, and inline blocks alongsideblock-level elements in description of 'bidi-override' value. Alsocorrected the prose to handle anonymous child blocks.

Updated mention of Unicode's embedding limit from 15 to 61.

C.3.29Section 10.1Definition of "containing block"

Included table cells (and inline blocks) together with block-level elementsin rule 2 defining the containing block of non-absolutely-positioned elements.

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

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.31Section 10.4Minimum and maximum widths

The initial value for 'min-width' is now '0' rather than UA-dependent.

Corrected "applies to" exception for both 'min-width' and 'max-width'from "table elements" to "table rows and row groups".

Specified that negative values for 'min-width' and 'max-width' areillegal.

C.3.32Section 10.6.3Block-level non-replaced elements in normal flow when 'overflow'computes to 'visible'

Added that 'auto' height also depends on whether the element haspadding or borders, as these influence margin-collapsing behavior.

Added text to correctly account for margin collapsing behavior.

C.3.33Section 10.7Minimum and maximum heights

Corrected "applies to" exception for both 'min-width' and 'max-width'from "table elements" to "table columns and column groups".

Specified that negative values for 'min-height' and 'max-height'are illegal.

C.3.34Section 11.1.1Overflow

Corrected "applies to" line for 'overflow' from "block-level andreplaced elements" to "non-replaced block-level elements, table cells,and inline-block elements".

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

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

Corrected "rect (<top> <right> <bottom> <left>)" to"rect(<top>, <right>, <bottom>, <left>)".

C.3.36Section 11.2Visibility

Corrected initial value of 'visibility' to 'visible'.

C.3.37Section 12.4.2 Counterstyles

The example used the style 'hebrew', which does not exist in CSSlevel 2. Changed to 'lower-greek'.

C.3.38Section 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 elementcannot be a child of another UL element). An LI has been inserted inbetween.

C.3.39Section 14.2 The background

Second sentence: "In terms of the box model, 'background' refers tothe background of the content and the padding areas" now alsomentions the border area. (See alsoerrata to section8.1 above.) Thus:

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

C.3.40Section 14.2.1Background properties

Under 'background-image', defined the image tile size used whenthe background image has intrinsic sizes specified in percentagesor 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, paddingandborder areas [...]".

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

Even if the image is fixed, it is still only visiblewhen it is in the background, paddingor border area of theelement.

C.3.41Section 15.2 Fontmatching algorithm

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

C.3.42Section 15.7Font size

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

C.3.43Section 16.1Indentation

Corrected 'text-indent' to apply to table cells (and inline blocks)as well as block-level elements.

C.3.44Section 16.2Alignment

Corrected 'text-align' to apply to table cells (and inline blocks)as well as block-level elements.

Changed prose about the effect of 'justify' to be less correct.

Corrected the note to say that justification is also dependenton the script, not just the language, of the text.

C.3.45Section 17.2 The CSS tablemodel

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

C.3.46Section 17.2.1Anonymous table objects

Added 'table-header-group' and 'table-footer-group' alongsidementions 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 boxesrequiring a 'table' or 'inline-table' parent in rule 4.

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

C.3.47Section 17.4Tables 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 ifthe table is inline-level but that the anonymous outer tablebox cannot accept run-ins.

C.3.48Section 17.5Visual layout of table contents

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

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 fixedpositioning, as well as floating, remove a box from the flow, affectingtable size.

C.3.49Section 17.5.1Table layers and transparency

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

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

Specify the handling of "missing cells".

C.3.50Section 17.6.1The separated borders model

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

C.3.51Section 18.2 SystemColors

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

C.3.52Section E.2 Paintingorder

Changed "but any descendants which actually create a new stackingcontext" to "but anypositioned descendants and descendantswhich actually create a new stacking context" (3 times).

This change also occurred once insection 9.5 (Floats) and once insectionsection 9.9 (Layeredpresentation).

C.4Clarifications

C.4.1Section 2.1A brief CSS 2.1 tutorial for HTML

This section has been marked non-normative.

C.4.2Section 2.2A 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 theXMLstyle sheet PIwas written after CSS2 was finalized. The first line of the full XMLexample should not have been be<?XML:stylesheet type="text/css"href="bach.css"?>, but

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

C.4.3Section 2.3The CSS 2.1 processing model

This section has been marked non-normative.

C.4.4Section 3.1Definitions

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

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

Changed definition of 'replaced element' to "an element whose contentis outside the scope of the CSS formatting model" and added further clarifyingtext. This clarifies that e.g., SVG images embedded in an XML document arealso considered replaced elements, not just those linked in from an outsidefile. Also changed definition of 'rendered content' to be consistent with thisclarification.

Added under "Intrinsic dimension" that raster images withoutreliable resolution information are assumed to have a size of 1 pxunit per image source pixel.

Added definition for 'ignore'.

Added definition for 'HTML user agent'.

Added definition for 'property'.

C.4.5Section 4.1Syntax

Moved definitions of "immediately before" and "immediately after" forwardso they apply to the whole Syntax section.

Added sections 4.1.2.1 and 4.1.2.2 to defined vendor-specificextensions.

C.4.6Section 4.1.1Tokenization

Clarified that input that cannot be parsed according to the core syntaxis ignored according to the rules for handling parsing errors.

Clarified that input that cannot be tokenized or parsed has no meaning inCSS2.1.

C.4.7Section 4.1.3Characters and case

Clarified that when a CRLF pair terminates an escape sequence, the pairis treated as a single white space character ascorrectedin the tokenization rules.

Replaced "[a-z0-9]" by "[a-zA-Z0-9]" as an extra reminder that CSSidentifiers are case-insensitive.

C.4.8Section 4.1.7Rule sets, declaration blocks, and selectors

Replaced the term "{}-block" with "declaration block".

C.4.9Section 4.2Rules for handling parsing errors

Clarified that all property:value combinations and @-keywords that do notcontain an identifier beginning with dash or underscore are reserved by CSSfor future use.

Clarified that when something inside an at-rule is ignored because it isinvalid, this does not make the entire at-rule invalid.

Referenced section 4.1.7 for parsing invalid bits inside declarationblocks.

C.4.10Section 4.3.1Integers and real numbers

Clarified that '-0' is equivalent to '0' and is not a negative number.

C.4.11Section 4.3.2Lengths

Clarified that negative length values on properties that do not allow themcause the declaration to be ignored.

C.4.12Section 4.3.4URLs and URIs

Reduced unnecessary discussion of what a URI is.

C.4.13Section 5.1Pattern matching

Added note about terminology change ("simple selector") betweenCSS2 and CSS3.

C.4.14Section 5.7Adjacent sibling selectors

Clarified that text nodes and comments do not affect whether asibling selector matches.

C.4.15Section 5.8.1Matching attributes and attribute values

Clarified ~= and |= by using the definitions from the Selectorsmodule.

C.4.16Section 5.8.2Default attribute values in DTDs

Clarified that rules about default attribute values are the same,whether the default is specified in a DTD or by other means.

C.4.17Section 5.9 IDselectors

Added a note that it depends on the document format whichattributes are ID attributes.

C.4.18Section 5.11.3 Thedynamic pseudo-classes: :hover, :active, and :focus

Clarified that CSS 2.1 doesnot define if the parentof an element that matches ':active' or ':hover' itself also matches':active' or ':hover'.

Added note that, in CSS1, ':active' only applies to links.

C.4.19Section 5.11.4 Thelanguage pseudo-class: :lang

Added a note to show the differences between ':lang(xx)' and'[lang=xx]'.

C.4.20Section 5.12.2The :first-letter pseudo-element

Clarified that digits can also be first letter.

C.4.21Section 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.22Section 6.2.1 The 'inherit' value

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

C.4.23Section 6.3 The @import rule

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

C.4.24Section 6.4 The Cascade

Obfuscated note about system settings and UA limitations.

C.4.25Section 6.4.1 Cascading order

Various editorial changes to clarify sort order.

C.4.26Section 6.4.3 Calculating aselector'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]" iscounted as an attribute selector (a=0, b=1, c=0), even if theid attribute is defined as an "ID" in the sourcedocument's DTD.

C.4.27Section 7.2.1The @media rule

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

C.4.28Section 7.3 Recognizedmedia types

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

C.4.29Section 7.3.1Media groups

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

C.4.30Section 8.1 Box dimensions

C.4.31Section 8.3 Margin properties

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

C.4.32Section 8.3.1Collapsing margins

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

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

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

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

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

C.4.33Section 8.5.3Border style

Changed description of 'none' value to not imply that all four borderwidths are set to zero.

C.4.34Section 9.1.1The viewport

Changed the sentence "When the viewport is smaller than the ..., the useragent should offer a scrolling mechanism" to use "area of the canvas onwhich the document is rendered" instead of "document's initial containingblock".

C.4.35Section 9.2.4 The'display' property

Clarified that 'display: none' also applies to non-visual media.

C.4.36Section 9.3.1Choosing a positioning scheme

Clarified that the margins of fixed positioned boxes do not collapsewith any other margins.

Clarified that in print media fixed boxes are rendered on every page.

C.4.37Section 9.3.2Box offsets

Clarified that negative lengths and percentages are allowed as valuesof 'top', 'right', 'bottom', and 'left'.

Added "For replaced elements, the effect of this value depends onlyon the intrinsic dimensions of the replaced content. See the sectionson the width and height of absolutely positioned, replaced elementsfor details." to the definition of 'auto' because that's not whatchapter 10 says at all.

C.4.38Section 9.4.2Inline formatting context

Clarified that 'justify' stretches "spaces and words in inline boxes";previous text simply said that it stretches "inline boxes".

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

Clarified that an inline box that exceeds the width of a line boxand cannot be split therefore overflows the line box.

Removed sentence about formatting of margins, borders, and paddingfor split inline boxes not being fully defined when affected by bidias that situation is now defined insection8.6.

C.4.39Section 9.4.3Relative positioning

Clarified that although relative positioning normally does notdirectly affect layout, it may affect layout indirectly throughthe creation of scrollbars.

Relatively positioned boxes do not always establish new containingblocks. Changed the second paragraph to refer to the section oncontaining blocks accordingly.

The paragraph about dynamic movement and superscripting has beenshifted into a non-normative note.

C.4.40Section 9.5Floats

Clarified that line boxes are shortened to make room for themargin box of the float.

Added some text to clarify what "Any content in the current line beforea floated box is reflowed in the first available line on the other side ofthe float" means.

Clarified floats' position in the stacking order.

C.4.41Section 9.5.1Positioning the float

Clarified that the elements referenced in the float behaviorrules are in the same block formatting context as the float.

C.4.42Section 9.5.2Controlling flow next to floats

Clarified that the effects of 'clear' do not consider floatsin other block formatting contexts.

C.4.43Section 9.8Comparison of normal flow, floats, and absolute positioning

Added a note to clarify that the images in this section are notdrawn to scale and are illustrations, not reference renderings.

C.4.44Section 10.1Definition of "containing block"

Noted that a containing block formed by inline elements may wind upwith a negative containing block width.

C.4.45Section 10.2Content width

In the definition of <length> values for the 'width' property,changed "Specifies a fixed width" to "Specifies the width of the contentarea using a length unit".

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

Clarified that setting both left and right margins to 'auto'horizontally centers the element within its containing block.

C.4.47Section 10.3.8Absolutely positioning, replaced elements

Clarified which part of the text of section 10.3.7 is re-used.

C.4.48Section 10.4Minimum and maximum widths

Clarified that 'min-width' and 'max-width' do not affect thecomputed values of any properties. (They only affect the used value.)

C.4.49Section 10.6Calculating heights and margins

Clarified that these rules apply to the root element just as toany other element.

C.4.50Section 10.7Minimum and maximum heights

Clarified that 'min-width' and 'max-width' do not affect thecomputed values of any properties. (They only affect the used value.)

C.4.51Section 10.8Line height calculations

Removed clarifying note about line height being taller than tallestsingle inline box due to vertical alignment.

C.4.52Section 10.8.1 Leadingand half-leading

Removed "slightly" from the note "Values of this property haveslightly different meanings in the context of tables."

C.4.53Section 11.1Overflow and clipping

Clarified when absolute positioning and negative margins causeoverflow.

Added 'text-indent' to the list of things that can cause overflow.

Removed mention of 'clip' since it no longer affects most elements;mentioned that the 'overflow' property also specifies whether ascrolling mechanism is provided to access clipped content.

C.4.54Section 11.1.1Overflow

Clarified that descendant elements whose containing block is theviewport or an ancestor of the element are not affected by overflowclipping.

Removed unnecessary mentions of the 'clip' property from the 'hidden'value definition.

C.4.55Section 11.1.2Clipping

Changed "portion of an element's rendered content" to "portionof an element's border box" since clipping also affects the element'sbackgrounds and borders.

Clarified what parts of the element are affected by clipping.

Clarified that clipped content does not cause overflow.

Clarified that arguments of clip() can be separated by spaces or bycommas,but not a combination.

C.4.56Section 11.2Visibility

Clarified that descendants of a 'visibility: hidden' element willbe visible if they have 'visibility: visible'.

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

Clarified that :before and :after pseudo-elements interact withother boxes as if they were real elements just inside their associatedelement.

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

C.4.58Section 12.2The 'content' property

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

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

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

C.4.60Section 12.4Automatic counters and numbering

In the "self-nesting" behavior of counters, clarified that merelyusing a counter in a child element does not create a new instance of it:only resetting it does.

Clarified that the scope of a counter does not include any elementsin 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.61Section 12.4.3Counters in elements with 'display: none'

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

C.4.62Section 14.2 The background

Clarified that the root background image, although painted over the entirecanvas, is anchored as if painted only for the root element, and that the root'sbackground 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 astacking context and referred to z-index property for details.

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

Note that there is onlyone viewport perdocument. I.e., even if an element has a scrolling mechanism (see'overflow'), a 'fixed' background does not move with it.

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

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

C.4.63Section 15.1 Fonts Introduction

Drastically shortened introduction.

C.4.64Section 15.2Font matching algorithm

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

C.4.65Section 15.2.2 Font family

Removed discussion of font-matching algorithm. (It is alreadycovered in thefont-matching algorithm'sown section.

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

C.4.66Section 15.3.1Generic font families

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

C.4.67Section 15.4Font styling

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

C.4.68Section 15.5Small-caps

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

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

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

C.4.69Section 15.6Font boldness

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

Removed statement that says "User agents must map names to valuesin a way that preserves visual order; a face mapped to a valuemust not be lighter than faces mapped to lower values." This isotherwise implied by "The only guarantee is that a face of a givenvalue will be no less dark than the faces of lighter values."

C.4.70Section 15.7Font size

Clarified relationship of font size to em squares.

Added a totally irrelevant note about font sizes virtual realityscenes.

C.4.71Section 16.1Indentation

Clarified that text overflowing due to text-indent is affectedby the 'overflow' property.

Added a note about text-indents inheriting behavior and suggesting'text-indent: 0' on inline-blocks.

C.4.72Section 16.2Alignment

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

C.4.73Section 16.3.1Underlining, over lining, striking, and blinking

Added an example to illustrate how underlining affects descendantboxes.

C.4.74Section 16.5Capitalization

Switched language reference from RFC2070 to BCP47.

C.4.75Section 16.6White space

Addedsection 16.6.1 as an exampleto illustrate the interaction of white space collapsing and bidi.

C.4.76Section 17.1Introduction to tables

Expanded introduction to include a brief discussion of the twotable layout models. Mentioned that the automatic table algorithmis not fully defined in CSS 2.1 but that some implementationshave achieved relatively close interoperability.

C.4.77Section 17.2The CSS table model

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

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

C.4.78Section 17.2.1Anonymous table objects

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

C.4.79Section 17.4Tables in the visual formatting model

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

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

Clarified that percentage 'width' and 'height' on the table box isrelative to the anonymous box's containing block, not the anonymousbox itself.

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

C.4.80Section 17.5Visual layout of table contents

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

the edges of the rows, columns, row groups and columngroups in thecollapsing bordersmodel coincide with the hypothetical grid lines on which theborders of the cells are centered. (And thus, in this model, the rowstogether exactly cover the table, leaving no gaps; ditto for thecolumns.) In theseparated bordersmodel, the edges coincide with theborder edges of cells. (And thus, inthis 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 moreprecise about the possibly unintended effects.

C.4.81Section 17.5.1 Table layers andtransparency

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 isalways the background of the table element. See 17.6.1

C.4.82Section 17.5.2 Table width algorithms

Added a paragraph to clarify the interaction of the table widthalgorithms with the rules insection 10.3(Calculating widths and margins).

C.4.83Section 17.5.2.1Fixed table layout

Explicitly mentioned that the fixed table layout algorithm may beused with the algorithm ofsection10.3.3 when 'table-layout' is 'fixed' but 'width' is 'auto'.

C.4.84Section 17.5.2.2Automatic table layout

Clarified that UAs can use other algorithms besides the one inthis sectioneven if it results in different behavior.Also marked the rest of the section non-normative in accordancewith that statement.

C.4.85Section 17.5.4Horizontal alignment in a column

Changed "The horizontal alignment of a cell's content within a cellbox is specified with the 'text-align' property" to "The horizontalalignment of a cell'sinline content within a cell boxcan be specified with the 'text-align' property."

C.4.86Section 17.5.5Dynamic row and column effects

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

C.4.87Section 17.6.1The separated borders model

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

Added clarification about backgrounds: thesentence "This space is filled with the background of the tableelement" was replaced by:

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

C.4.88Section 17.6.2The collapsing borders model

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

C.4.89Section 18.2System Colors

Noted that system colors are deprecated in CSS3.

C.4.90Section 18.4Dynamic outlines

Clarified that outlines do not cause overflow.

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

C.4.91Section 18.4.1Outlines and the focus

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

C.4.92Appendix D Default style sheet forHTML 4

Added paragraph clarifying that some presentational markup inHTML can be replaced with CSS, but it requires different markup.

C.5Errata since the Candidate Recommendation of July2007

Errata to CSS 2.1 sinceCR version of July 19, 2007.

C.5.1Section 1.4.2.1 Value

[2009-04-15] The notation“&&” may be used in syntax definitions in futureCSS specifications.

C.5.2Section 2.3 The CSS 2.1 processing model

[2008-08-19] The first part of the sectionis not normative.

C.5.3Section 3.1 Definitions

[2007-11-14] AppendFor rasterimages without reliable resolution information, a size of 1 pxunit per image source pixel must be assumed. to thedefinition ofintrinsic dimensions.

C.5.4 Section4.1.1 Tokenization

[2007-09-27] RemoveDELIM? fromthe grammar rule

declaration :DELIM? property S* ':' S* value;

The DELIM was allowed there so that unofficial properties couldstart with a dash (-), but the dash was already allowed because of thedefinition ofIDENT.

[2009-02-02] ChangeU tou in token UNICODE-RANGE. (It means the same, but seems toavoid confusion.)

[2009-02-02] Clarify where comments areallowed:

COMMENT tokens do not occur in the grammar (to keep it readable),but any number of these tokens may appear anywherebetweenoutside other tokens.(Note, however, that a commentbefore or within the @charset rule disables the @charset.)

C.5.5Section 4.1.2.2 Informative Historical Notes

[2008-12-09] Other known vendor prefixesare: -xv-, -ah-, prince-, -webkit-, and -khtml-.

C.5.6Section 4.1.3 Characters and case

[2007-11-14] In the second bullet, change[a-z0-9] to[a-zA-Z0-9]; in thethird bullet, change[0-9a-f] to[0-9a-fA-F].

Although the preceding bullet already says that CSS iscase-insensitive, the explicit mention of upper and lower case lettershelps avoid mistakes.

C.5.7Section 4.1.3 Characters and case

[2008-03-05] CSS is now case-sensitive,except for certain parts:

All CSS syntax is case-insensitivewithin theASCII range (i.e., [a-z] and [A-Z] are equivalent), except forparts that are not under the control of CSS.

C.5.8Section 4.1.3 Characters and case

[2008-12-02] The pair “*/” endsa comment, even if preceded by a backslash. Change this sentence inthe third bullet:

Except within CSS comments, any character (except ahexadecimal digit) can be escaped with a backslash to remove itsspecial meaning.

C.5.9Section 4.1.3 Characters and case

[2009-04-15] Text added to match the grammar:

[…] any character (except a hexadecimal digit,linefeed, carriage return or form feed) can be escaped […]

C.5.10Section 4.1.5 At-rules

[2009-04-15] Clarified that unknownstatements are ignored when looking for @import:

CSS 2.1 user agents must ignore any '@import' rule that occursinside a block or after anyvalidnon-ignoredstatement other than an @charset or an @import rule.

C.5.11Section 4.1.7Rule sets, declaration blocks, and selectors

[2008-11-26] More precise statement of whatis ignored:

When a user agent cannot parse the selector (i.e., it isnot valid CSS 2.1), it must ignore theselector and thefollowing declaration block(if any) aswell.

C.5.12Section 4.2 Rules for handling parsing errors

[2009-04-15] Added error recovery rule forunexpected tokens at the top level:

Malformed statements. User agents must handleunexpected tokens encountered while parsing a statement by readinguntil the end of the statement, while observing the rules for matchingpairs of (), [], {}, "", and '', and correctly handling escapes. Forexample, a malformed statement may contain an unexpected closing braceor at-keyword. E.g., the following lines are all ignored:

p @here {color: red}     /* ruleset with unexpected at-keyword "@here" */@foo @bar;               /* at-rule with unexpected at-keyword "@bar" */}} {{ - }}               /* ruleset with unexpected right brace */) [ {} ] p {color: red } /* ruleset with unexpected right parenthesis */

C.5.13Section 4.2 Rules for handling parsing errors

[2008-11-26]Change “or block” as follows:

User agents must ignore an invalid at-keyword togetherwith everything following it, up to and including the next semicolon(;),or block ({...})the next block ({...}), or theend of the block (}) that contains the invalid at-keyword,whichever comes first.

C.5.14Section 4.3.2 Lengths

[2008-08-19] Add recommendation about sizeof px:

[…] the user agent should rescale pixel values.It isrecommended that the pixel unit refer to the whole number of devicepixels that best approximates the reference pixel.

C.5.15Section 4.3.5 Counters

[2008-03-05] Insertcase-sensitiveinCounters are denoted bycase-sensitiveidentifiers.

C.5.16Section 5.8.1 Matching attributes and attribute values

[2008-04-07] Clarified ~= and |= by usingthe definitions from theSelectors module.

[2008-11-03] Clarified that [foo~=""](i.e., with an empty value) will not match anything.

C.5.17 Section5.8.2 Default attribute values in DTDs

[2007-11-14] Replacetagselector bytype selector.

C.5.18Section 5.11.4 The language pseudo-class: :lang

[2009-04-15] The language code iscase-insensitive.

C.5.19Section 5.12.3 The :before and :after pseudo-elements

[2008-11-03] Clarified text:

When the :first-letter and :first-line pseudo-elementsarecombined withapplied to an element having contentgenerated using :before and :after, they apply to the firstletter or line of the element including theinserted textgenerated content.

C.5.20Section 6.3 The @import rule

[2008-08-19] Add “In CSS 2.1”and “See the section on parsing for when user agents must ignore@import rules” to

In CSS 2.1, any @import rules must precede allother rules (except the @charset rule, if present).See thesection on parsing for when user agents must ignore @importrules.

C.5.21Section 6.3 The @import rule

[2008-11-26] Define what it means to importa style sheet twice and how the media list is matched. Add at the end:

In the absence of any media types, the import is unconditional. Specifying 'all' for the medium has the same effect.The importonly takes effect if the target medium matches the media list.

A target medium matches a media list if one of the items inthe media list is the target medium or 'all'.

Note that Media Queries [MEDIAQ] extends the syntaxof media lists and the definition of matching.

When the same style sheet is imported or linked to a documentin multiple places, user agents must process (or act as though theydo) each link as though the link were to a separate style sheet.

C.5.22Section 6.4.1 Cascading order

[2007-11-22] Spelling error:precendence.

C.5.23Section 6.4.1 Cascading order

[2008-11-26] Define the meaning of a media list:

Find all declarations that apply to the element andproperty in question, for the target media type. Declarations apply ifthe associated selector matches the element in questionand thetarget medium matches the media list on all @media rules containingthe declaration and on all links on the path through which the stylesheet was reached.

C.5.24Section 7.2.1 The @media rule

[2008-12-02] The rules for parsing unknownstatements inside @media blocks were ambiguous. Change the firstsentence as follows:

An @media rule specifies the target media types (separated bycommas) of a set ofrulesstatements (delimitedby curly braces).Invalid statements must be ignored per 4.1.7"Rule sets, declaration blocks, and selectors" and 4.2 "Rules forhandling parsing errors."

Also make it explicit that CSS level 2 (unlike higher levels)has no nested @-rules. Add at the end of the section:“At-rules inside @media are invalid inCSS 2.1.

C.5.25Section 8.3.1 Collapsing margins

[2008-08-18] In bullet 6, sub-bullet 2, theposition of the top border edge is determined by assuming the elementhas a non-zerobottom (not: top) border.

C.5.26Section 8.3.1 Collapsing margins

[2009-02-02] Rephrased the rule foradjoining margins so that the 'min-height' and 'max-height' of anelement have no influence over whether the element's bottom margin isadjoining to its last child's bottom margin.

C.5.27Section 8.3.1 Collapsing margins

[2008-12-02] Not only elements with'overflow' other than 'visible', butall block formattingcontexts avoid collapsing their margins with their children. Changethe third bullet as follows:

C.5.28Section 9.2.2 Inline-level elements and inline boxes

[2008-12-02] Added missing 'inline-block'in: “Several values of the 'display' property make an elementinline: 'inline', 'inline-table','inline-block' and'run-in' (part of the time; see run-in boxes).”

C.5.29Section 9.2.4 The 'display' property

[2008-04-07] Clarified that 'display: none'also applies to non-visual media.

C.5.30Section 9.3.2 Box offsets: 'top', 'right', 'bottom','left'

[2008-08-19] Remove true but confusing note(occurs 4×):

Note: For absolutely positioned elements whose containingblock is based on a block-level element, this property is an offsetfrom the padding edge of that element.

C.5.31Section 9.5 Floats

[2008-08-19] Positioned descendants of afloat are in the stacking context of the float's parent. Add“positioned elements and” to

[…] except that anypositioned elements andelements that actually create new stacking contexts take part in thefloat's parent's stacking context.

Same change inSection 9.9 Layered presentation:

[…] exceptthat anypositioned elements and any elements that actuallycreate new stacking contexts take part in the parent stackingcontext.”

C.5.32Section 9.5 Floats

[2008-12-02] Remove “'s” thatmay be misinterpreted: “the float's parent's stackingcontext.”

C.5.33Section 9.5.2 Controlling flow next to floats: the 'clear'property

[2009-02-02] Add an example of negativeclearance after the first note.

C.5.34Section 9.6.1 Fixed positioning

[2008-11-03] Added:

Boxes with fixed position that are larger than thepage box are clipped. Parts of the fixed position box that are notvisible in the initial containing block will not print.

C.5.35Section 9.9.1 Specifying the stack level: the 'z-index'property

[2008-12-02] The list of stacking levels isambiguous: relatively positioned elements could fall under items 3/4/5or under item 6. Meant is item 6, so exclude them from 3/4/5 asfollows:

  1. the background and borders of the element forming the stacking context.
  2. the stacking contexts of descendants with negative stack levels.
  3. a stacking level containing in-flow non-inline-levelnon-positioned descendants.
  4. a stacking level fornon-positioned floats and their contents.
  5. a stacking level for in-flow inline-levelnon-positioned descendants.
  6. a stacking level for positioned descendants with 'z-index: auto', and any descendant stacking contexts with 'z-index: 0'.
  7. the stacking contexts of descendants with positive stack levels.

C.5.36Section 10.1 Definition of "containing block"

[2009-02-02] Rephrase first bullet point tomake easier to read:

The containing block in which the root element lives is arectangle with the dimensions of the viewport, anchored at the canvasorigin for continuous media, and the page area for paged media. Thiscontaining block is called the initial containing block.

The containing block in which the root element lives is arectangle called the initial containing block. For continuous media,it has the dimensions of the viewport and is anchored at the canvasorigin; it is the page area for paged media.

C.5.37Section 10.3 Calculating widths and margins

[2009-04-15] The values of 'left' and'right' are only determined by section 9.4.3 in the case ofrelatively positioned elements:

For Points 1-6 and 9-10, the values of 'left' and 'right'usedfor layoutin the case of relatively positionedelements are determined by the rules insection 9.4.3.

C.5.38Section 10.3.1 Inline, non-replaced elements

[2009-04-15] The only case in which 'left'or 'right' can be 'auto' is when the element is statically positioned. In that case 'left' and 'right are ignored and there is thus no needto determine a used value:

A computed value of 'auto' for'left', 'right','margin-left' or 'margin-right' becomes a used value of '0'.

C.5.39Section 10.3.2 Inline, replaced elements

[2007-11-14] Add the followingparagraph:

Otherwise, if 'width' has a computed value of'auto', and the element has an intrinsic width, then that intrinsicwidth is the used value of 'width'.

just before the paragraph beginningOtherwise, if 'width' has acomputed value of 'auto', but none of the conditions above are met,[…].

C.5.40Section 10.3.2 Inline, replaced elements

[2008-03-05] Change the last paragraph asfollows:

If it does,then a percentage intrinsic width onthat element cannot be resolved and the element is assumed to have nointrinsic widththen the resulting layout is undefined inCSS2.1.

C.5.41Section 10.3.3 Block-level, non-replaced elements in normalflow

[2008-03-05] Scrollbar widths are no longerincluded in the containing block width. Remove scrollbar width from:

'margin-left' + 'border-left-width' + 'padding-left' +'width' + 'padding-right' + 'border-right-width' + 'margin-right'+ scrollbar width (if any) = width of containingblock

and from:

If 'width' is not 'auto' and 'border-left-width' +'padding-left' + 'width' + 'padding-right' + 'border-right-width'+ scrollbar width (if any) [...]

and remove the paragraph:

The "scrollbar width" value is only relevant ifthe user agent uses a scrollbar as its scrolling mechanism. See thedefinition of the 'overflow' property.

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

[2008-03-05] Scrollbar widths are no longerincluded in the containing block width. Remove scrollbar width from:

'left' + 'margin-left' + 'border-left-width' +'padding-left' + 'width' + 'padding-right' + 'border-right-width' +'margin-right' + 'right'+ scrollbar width (if any) = widthof containing block

and remove the paragraph:

The "scrollbar width" value is only relevant ifthe user agent uses a scrollbar as its scrolling mechanism. See thedefinition of the 'overflow' property.

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

[2008-03-05] Add the following definition.

[2008-08-19] Add the following note to thatdefinition.

Thestatic-position containing block isthe containing block of a hypothetical box that would have been thefirst box of the element if its specified 'position' property had been'static'and its 'float' had been 'none'. (Note that due to the rules insection 9.7 this hypothetical calculation might require also assuminga different computed value for 'display'.)

And change which 'direction' property is used as follows (twooccurrences):

[...] if the 'direction' property of theelementestablishing the static-position containing block is[...]

C.5.44Section 10.3.8 Absolutely positioned, replaced elements

[2008-03-05] Change bullet 2 as follows:

[...] ifthe 'direction'propertyof theelement establishing the static-position containingblock is [...]

C.5.45Section 10.3.8 Absolutely positioned, replaced elements

[2008-03-05] Clarification. Replace

This situation is similar to the previous one,except that the element has an intrinsic width. The sequence ofsubstitutions is now:

by

In this case, section 10.3.7 applies up throughand including the constraint equation, but the rest of section 10.3.7is replaced by the following rules:

C.5.46Section 10.3.8 Absolutely positioned, replaced elements

[2008-04-07] Clarified that margins arenot calculated as for inline elements.

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

Under “<percentage>,” add the same note as under“<percentage>,” in section 10.2 (“Contentwidth: the 'width' property”).

C.5.48Section 10.6.2 Inline replaced elements […]

[2007-11-14] Add the followingparagraph:

Otherwise, if 'height' has a computed value of'auto', and the element has an intrinsic height, then that intrinsicheight is the used value of 'height'.

just before the paragraph beginningOtherwise, if 'height' has acomputed value of 'auto', but none of the conditions above aremet […].

C.5.49Section 10.6.4 Absolutely positioned, non-replacedelements

[2008-11-26] The static position isdetermined consideringneither floatnor clear. Addthis:

[…] and its specified 'float' had been 'none'and 'clear' had been 'none'.

C.5.50Section 10.6.5 Absolutely positioned, replaced elements

[2008-04-07] Clarified that margins arenot calculated as for inline elements.

C.5.51 Section 10.8.1Leading and half-leading

[2007-11-14] In the Note under'vertical-align', removeslightly fromValues ofthis property haveslightly different meanings in thecontext of tables.

C.5.52Section 11.1.1 Overflow: the 'overflow' property

[2008-03-05] Scrollbar widths are no longerincluded in the containing block width. Replace

The space taken up by the scrollbars affects thecomputation of the dimensions in the renderingmodel.

by

Any space taken up by the scrollbars should betaken out of (subtracted from the dimensions of) the containing blockformed by the element with the scrollbars.

[2008-11-03] 'Overflow' on BODY is specialnot only in HTML but also in XHTML. Change the sentence“HTML UAs must instead apply the 'overflow' property fromthe BODY element to the viewport, if the value on the HTML element is'visible'.” to:

When the root element is an HTML "HTML" element oran XHTML "html" element, and that element has an HTML "BODY" elementor an XHTML "body" element as a child, user agents must instead applythe 'overflow' property from the first such child element to theviewport, if the value on the root element is 'visible'.

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

[2008-03-05] Insert(but not acombination) inUser agents must support separation withcommas, but may also support separation without commas(but not acombination).

C.5.54Section 12.2 The 'content' property

[2009-04-15] (And also insection 12.4:) certain keywords, in particular 'none', 'inherit'and 'initial' (the latter being reserved for future use) cannot beused as names for counters.

C.5.55Section 12.4.2 Counter styles

[2008-03-05] Error in example. Replacehebrew by lower-greek:

BLOCKQUOTE:after { content: " [" counter(bq,hebrewlower-greek) "]" }

C.5.56Section 12.5 Lists

[2008-12-01] Change “in” to“with respect to” in

The list properties describe basic visual formatting oflists: they allow style sheets to specify the marker type (image,glyph, or number), and the marker positioninwithrespect to the principal box (outside it or within it beforecontent).

because the marker is, as the rest of the sentence itself makesclear, not necessarilyin the principal box.

C.5.57Section 12.5.1 Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

[2008-04-07] The size of list style markerswithout an intrinsic size is now defined.

C.5.58Section 12.5.1 Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

[2008-12-01] CSS 2.1 does not specifythe position of the list item marker, butdoes require it tobe on the left or right of the content. Also, the marker is notaffected by 'overflow', butmay influence the height of the principal box. Add to the definition of 'outside':

… but does require that for list items whose'direction' property is 'ltr' the marker box be on the left side ofthe content and for elements whose 'direction' property is 'rtl' themarker box be on the right side of the content. 'Overflow' on theelement does not clip the marker box. The marker box is fixed withrespect to the principal block box's border and does not scroll withthe principal block box's content. The size or contents of the markerbox may affect the height of the principal block box and/or the heightof its first line box, and in some cases may cause the creation of anew line box. Note: This interaction may be more precisely defined ina future level of CSS.

C.5.59Section 12.5.1 Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

[2009-04-015] Meaning of 'none' for'list-style' was only defined by an example.

C.5.60Section 13.2 Page boxes: the @page rule

[2008-08-19] Add rules for drawing canvasto:

C.5.61Section 13.2.1.1 Rendering page boxes that do not fit a targetsheet

[2009-02-02]

Remove sections 13.2.1.1and 13.2.1.2. (The described situations cannot occur in CSS 2.1,because CSS 2.1 does not have a 'size' property.)

C.5.62Section 13.2.3 Content outside the page box

[2008-11-03] Clarified what locations areinconvenient for printing:

When formatting content in the page model, some contentmay end up outside thecurrent page box. For example, anelement whose 'white-space' property has the value 'pre' may generatea box that is wider than the page box.As another example,when boxes are positioned absolutelyor relatively, theymay end up in “inconvenient” locations. For example,images may be placed on the edge of the page box or 100,000 metersbelow the page box.

C.5.63Section 13.3.1 Page break properties: 'page-break-before','page-break-after', 'page-break-inside'

[2008-04-30] The 'page-break-inside'property no longer inherits.

C.5.64Section 13.3.1 Page break properties: 'page-break-before','page-break-after', 'page-break-inside'

[2008-12-01] UAsmay apply'page-break-before', 'page-break-after' and 'page-break-inside' toother elements than block-level ones.

C.5.65Section 13.3.2 Breaks inside elements: 'orphans','widows'

[2009-02-02] “Paragraph” is nota defined term. Changeof a paragraph toin a blockelement (twice).

C.5.66Section 13.3.2 Breaks inside elements: 'orphans','widows'

[2009-04-15] 'Widows' and 'orphans' onlyaccept positive values.

C.5.67Section 13.3.3 Allowed page breaks

[2008-04-30] The 'page-break-inside'property of all ancestors is checked for page-breaking restrictions,not just that of the breakpoint's parent.

C.5.68Section 13.3.3 Allowed page breaks

[2009-02-02] Remove possible confusion:

Rule D: In addition, breaking at (2) is allowed only if the'page-break-inside' property ofthe element and allits ancestors is 'auto'.

C.5.69Section 13.3.3 Allowed page breaks

[2009-02-02] Top margins donotdisappear at a page break that is forced by a 'page-break-after' or'page-break-before'. Correct the first bullet to:

When anunforced page break occurs here, the used valuesof the relevant 'margin-top' and 'margin-bottom' properties are set to'0'.When a forced page break occurs here, the used value of therelevant 'margin-bottom' property is set to '0'; the relevant'margin-top' used value may either be set to '0' or retained.

And add the following note:

Note: It is expected that CSS3 will specify that the relevant'margin-top' applies (i.e., is not set to '0') after a forced pagebreak.

C.5.70Section 13.3.5 "Best" page breaks

[2009-02-02] Remove the advice to useragents to avoid breaking inside elements with borders, inside tablesor inside floating elements; add the advice to avoid breaking insidereplaced elements.

C.5.71Section 14.2 The background

[2008-11-03] The 'background' property isspecial on BODY not only in HTML but also in XHTML.

C.5.72Section 14.2 The background

[2009-04-15] The whole 'background'property is used for the canvas, not just the color and the image:

For documents whose root element is an HTML "HTML" element or anXHTML "html" element that has computed values of 'transparent' for'background-color' and 'none' for 'background-image', user agents mustinstead use the computed value ofthosethebackground properties from that element's first HTML "BODY"element or XHTML "body" element child […]

C.5.73Section 14.2.1 Background properties: 'background-color','background-image', 'background-repeat', 'background-attachment','background-position', and 'background'

[2008-04-07] The size of background imageswithout an intrinsic size is now defined.

C.5.74Section 15.6 Font boldness: the 'font-weight' property

[2008-11-26] Remove incorrect text:

and:

The computed value of "font-weight" iseither:

And instead add this note:

Note: A set of nested elements that mix 'bolder'and 'lighter' will give unpredictable results depending on the UA, OS,and font availability. This behavior will be more precisely defined inCSS3.

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

[2008-08-19] Remove rules about generatedtext from:

The following examples show what whitespace behavior is expectedfrom the PRE and P elements, the “nowrap” attribute inHTML,and in generated content.

pre        { white-space: pre }p          { white-space: normal }td[nowrap] { white-space: nowrap }:before,:after { white-space: pre-line }

C.5.76Section 16.6.1 The 'white-space' processing model

[2009-02-02] Collapsing of white space doesnot remove any line breaking opportunities. Add the followingclarification:

Then, the entire block is rendered. Inlines are laid out, takingbidi reordering into account, and wrapping as specified by the'white-space' property.When wrapping, line breakingopportunities are determined based on the text prior to the whitespace collapsing steps above.

C.5.77 Section17.2.1 Anonymous table objects

[2007-11-14] Spelling error:boxess.

C.5.78 Section17.2.1 Anonymous table objects

[2008-10-13] Added new rule afterbullet 4:

5. If a child T of a 'table', 'inline-table', 'table-row-group','table-header-group', 'table-footer-group', or 'table-row' box is ananonymous inline box that contains only white space, then it istreated as if it has 'display: none'.

C.5.79Section 17.4 Tables in the visual formatting model

[2009-02-02] The anonymous block containingthe table and its caption establishes a block formatting context:

The anonymous box is a 'block' box if the table is block-level, andan 'inline-block' box if the table is inline-levelexcept thatthis block is never considered as a block for 'run-in' interaction,and thatThe anonymous box establishes a block formattingcontext. The table box (not the anonymous box) is used whendoing baseline vertical alignment for an 'inline-table'.

The diagram now shows the caption's marginsinside theanonymous box.

C.5.80Section 17.5.4 Horizontal alignment in a column

[2008-04-07] Clarification:

The horizontal alignment of a cell'sinlinecontent within a cell boxiscan be specifiedwith the 'text-align' propertyby the value of the'text-align' property on the cell.

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

[2008-04-07] The size of cursors without anintrinsic size is now defined.

C.5.82Section B.2 Informative references

[2007-11-14] Spelling error: change?lik toÇelik(2×).

C.5.83Appendix D. Default style sheet for HTML 4

[2008-08-19] Replace

br:before       { content: "\A" }:before, :after { white-space: pre-line }

with

br:before       { content: "\A"; white-space: pre-line }

C.5.84Appendix D. Default style sheet for HTML 4

[2008-08-19] Add tr to:

td, th, tr      { vertical-align: inherit }

C.5.85 SectionE.2 Painting order

[2007-11-14] Replacebut any descendantswhich actually create a new stacking context bybut anypositioned descendants and descendants which actuallycreate a new stacking context.

C.5.86 AppendixG. Grammar of CSS 2.1

[2007-09-27] Change the lastS inthe grammar rule forcombinator toS+:

combinator  : PLUS S*  | GREATER S*  | S+

and remove the rule

{s}+\/\*[^*]*\*+([^/*][^*]*\*+)*\/  {unput(' '); /*replace by space*/}

in the tokenizer. The resulting language is the same, but thegrammar is easier to read and relies less on specific notations ofFlex.

C.5.87Section G.1 Grammar

[2007-09-27] Changes to remove ambiguitywith respect to the S token and avoid nullable non-terminals.

C.5.88Section G.2 Lexical scanner

[2007-09-27] Change the tokenizer rule

@{C}{H}{A}{R}{S}{E}{T}{return CHARSET_SYM;}

to

"@charset "  {return CHARSET_SYM;}

The @charset must be in lowercase and must have a space after it(as defined in section 4.4 CSS style sheet representation).

C.5.89Section G.2 Lexical scanner

[2008-03-05] Change the tokenizer rules

"url("{w}{string}{w}")" {return URI;}"url("{w}{url}{w}")"    {return URI;}

to

{U}{R}{L}"("{w}{string}{w}")"{return URI;}{U}{R}{L}"("{w}{url}{w}")"{return URI;}

C.5.90Section G.2 Lexical scanner

[2008-04-07] The definition of the macro“O” is wrong. The letters Oand o can be written with hexadecimal escapes as“\4f” and “\6f”respectively (not as “\51” and“\71”). The macro should therefore be

Oo|\\0{0,4}(4f|6f)(\r\n|[ \t\r\n\f])?|\\o

C.5.91Section G.2 Lexical scanner

“The two occurrences of "\377"…”: There is infact only one occurrence.

C.5.92Appendix I. Index

Add a TITLE attribute to all links and which is equal to the lemma.

C.6Errata since the Candidate Recommendation of April2009

These are the errata forCSS level 2revision 1, CR version of 23 April 2009. These corrections have thestatus of a draft.

C.6.1Section 4.2 Rules for handling parsing errors

[2009-08-06] Clarified the rules forignoring invalid at-keywords:

Invalid at-keywords. User agents must ignore aninvalid at-keyword together with everything following it,up to theend of the block that contains the invalid at-keyword, or up to andincluding the next semicolon (;),or up toand including the next block ({...}),or the endof the block (}) that contains the invalid at-keyword, whichever comesfirst.

C.6.2Section 13.3.3 Allowed page breaks

[2009-08-06] Page breaks are also allowedwhen there is a gap after the last content of a block. Added thefollowing to the first list:

3. Between the content edge of a block box and the outer edges ofits child content (margin edges of block-level children or line boxedges for inline-level children) if there is a (non-zero) gap betweenthem.

C.6.3Section 15.3 Font family: the 'font-family' property

[2009-08-31] The list of keywords in“(e.g., 'initial', 'inherit', 'default', 'serif', 'sans-serif','monospace', 'fantasy', and 'cursive')” isn't an example, but isin fact the complete and normative list.

C.6.4Section 15.3.1.1 serif

[2009-08-31] Spelling errors in font names. The correct names are “Excelsior Cyrillic Upright” and“ER Bukinist.”

C.6.5Section 15.7 Font size: the 'font-size' property

[2009-08-31] The two notes “Note:implementation experience has demonstrated…” and“Note 2. In CSS1, the suggested scaling factor… sayessentially the same thing. They are replaced by a single note:

Note 2. In CSS1, the suggested scaling factorbetween adjacent indexes was 1.5, which user experience proved to betoo large. In CSS2, the suggested scaling factor for a computer screenbetween adjacent indexes was 1.2, which still created issues for thesmall sizes. Implementation experience has demonstrated that a fixedratio between adjacent absolute-size keywords is problematic, and thisspecification doesnot recommend such a fixed ratio.

C.6.6Section 17.5.2.1 Fixed table layout

[2009-05-20] UAsmay render extracolumns if there are unexpected columns in later rows of a 'fixed' tablelayout. In that case, the width of the columns and of the table isundefined.

C.6.7Section 17.5.3 Table height layout

[2009-08-06] Replaced“Percentage heights on table cells, table rows, and tablerow groups compute to 'auto' by

CSS 2.1 does not define how the height of table cells andtable rows is calculated when their height is specified usingpercentage values. CSS 2.1 does not define the meaning of'height' on row groups.

C.6.8Appendix G. Grammar of CSS 2.1

[2009-08-06] Removed ambiguities from thegrammar. (The ambiguities only affected spaces and were harmless.)

C.7Errata since the Candidate Recommendation ofSeptember 2009

These are the errata forCSS level 2revision 1, CR version of 8 September 2009. Thesecorrections have the status of a draft.

C.7.1Section 1.4.2.1 Value

[2010-08-06] (Also in various othersections throughout the specification.) Distinguished all cases wherethe wordvalue referred to a whole property value from whereit referred to only part of such a value (such as a component in acomma-separated list). The former is nowproperty value, thelattercomponent value.

C.7.2Section 3.1 Definitions

[2010-04-19] Add a clarification to thedefinition of replaced element:

The content of replaced elements is not considered in the CSSrendering model.

(Previously, the definition only said that the content was“outside the scope of CSS.”)

C.7.3Section 4.1.1 Tokenization

[2010-04-19] The definition of“identifier” in 4.1.3 (2nd bullet) and in the grammar werecontradictory w.r.t. whether no-break space (U+00A0) was allowed inidentifiers or not. Change the text in 4.1.3 to allow no-break space:“charactersU+00A1U+00A0 andhigher.”

Also, change the macro “nonascii” in the tokendefinition from “[^\0-\177]” to[^\0-\237]”. (When CSS was first written, Unicodedidn't have code points U+0080 to U+009F, i.e., \200-\237 in octal.)

C.7.4Section 4.1.1 Tokenization

[2010-09-29] The tokenizer has beenmodified so that it can be implemented as a state machine withoutback-up (e.g., with Lex). This changes the meaning of an input of theform “url(…(…)…)”, i.e., input thatstarts like a URI token but then contains a parenthesis (which is notallowed in a URI token). Previously, such input was re-parsed to yielda FUNCTION token followed by other things; now it yields a BAD_URItoken. Given that CSS has never used a FUNCTION token of the form“url(” this should not affect any existing CSS stylesheets.

A non-normative section has been added to appendix G with anexplanation of how to make a tokenizer without back-up.

C.7.5Section 4.1.1 Tokenization

[2010-09-29] The definition of the URItoken was ambiguous: it allowed a backslash to be either parsed on itsown or as part of an escape. A backslash in a URI token must always beinterpreted as part of an escape.

C.7.6Section 4.1.1 Tokenization

[2010-09-29] Error handling for illegaltokens (braces, at-keywords, and SGML comment tokens) insideparenthesized expressions was not well defined. Change the productionfor “any” as follows

any         : [ IDENT | NUMBER | PERCENTAGE | DIMENSION | STRING              | DELIM | URI | HASH | UNICODE-RANGE | INCLUDES              | DASHMATCH | ':' | FUNCTION S*[any|unsused]* ')'              | '(' S*[any|unused]* ')' | '[' S*[any|unused]* ']'              ] S*;unused      : block | ATKEYWORD S* | ';' S* | CDO S* | CDC S*;

and add the following explanation:

The "unused" production is not used in CSS and will not beused by any future extension. It is included here only to help witherror handling. (See 4.2 "Rules for handling parsingerrors.")

C.7.7Section 4.1.2.2 Informative Historical Notes

[2010-04-19] Add “-tc-” to thelist of existing vendor prefixes.

C.7.8Section 4.1.3 Characters and case

[2010-08-06] The handling of a backslashbefore a newline or at the end of a file is no longer undefined: it isparsed as a DELIM.

C.7.9Section 4.1.3 Characters and case

[2010-08-06] Make text and formal grammarthe same:

In CSS, identifiers […]; they cannot start with a digit,two hyphens, or a hyphen followed by a digit.

C.7.10Section 4.1.8 Declarations and properties

[2010-05-12] Remove “2.1” from

Every CSS2.1 property has its own syntacticand semantic restrictions

C.7.11Section 4.2 Rules for handling parsing errors

[2010-07-07] Clarify that the fifth bulletonly applies to at-rules. (At-keywords in other constructs are alreadyhandled in the preceding bullets.)

C.7.12Section 4.3.2 Lengths

[2010-04-19] Make explicit that 'ex', whenused in the 'font-size' property, refers to theparentelement's 'ex' (just as 'em' refers to the parent's 'em' in thatcase.)

C.7.13Section 4.3.2 Lengths

[2010-10-28] A UA must noweitherdisplay absolute lengths (cm, in, pt, etc.) at their real sizeor make px align with device pixel boundaries near the 0.0213degrees viewing angle, but not both. In either case, 3px must equal4pt.

(Until now, authors could use absolute lengths for physical sizesand px for aligning to device pixels, but couldn't know the number ofpt in a px, except in combination with Media Queries. Authors can nolonger choose between absolute or device-related units, but can use pxand pt interchangeably. This should only affect relativelylow-resolution devices: above 300 dots per inch, the maximum error isabout 16%.)

C.7.14Section 4.3.4 URLs and URIs

[2010-05-12] Commas do not have to beescaped in <uri> tokens:

Some characters appearing in an unquoted URI, such as parentheses,commas, white space characters, single quotes (') anddouble quotes ("), must be escaped

C.7.15Section 4.3.4 URLs and URIs

[2010-04-21] Describe in English what wasonly expressed through the grammar:

Note. Since URIs may contain characters that would otherwisebe used as delimiters in CSS, the entire URI value must be treated asa single unit by the tokenizer and normal tokenization behavior doesnot apply within a URI value. Therefore comments are not allowedwithin a URI value.

C.7.16Section 5.8.2 Default attribute values in DTDs

[2010-09-29] Clarify what is meant by“is not required”:

More precisely, a UAmay, but isnot requiredto, read an "external subset" of the DTD butisrequired to look for default attribute values in the document's"internal subset." (See [XML10] for definitions of these subsets.)Depending on the UA, a default attribute value defined in the externalsubset of the DTD might or might not appear in the document tree.

A UA that recognizes an XML namespace [XMLNAMESPACES]may,but is not required to, use its knowledge of thatnamespace to treat default attribute values as if they were present inthe document. (E.g., an XHTML UA is not required to use its built-inknowledge of the XHTML DTD.)

and:

the first rulewillmight not match elementswhose "notation" attribute is set by default, i.e., not setexplicitly. To catch all cases, the attribute selector for the defaultvalue must be dropped:

C.7.17Section 5.11.4 The language pseudo-class: :lang

[2010-08-06] The argument of ':lang()' isonly case-insensitive for characters in ASCII.

C.7.18Section 5.12 Pseudo-elements

[2010-08-06] Clarify that pseudo-elementsbehave like elements for the aspects not explicitly mentioned:

Pseudo-elements behave just like real elements in CSS with theexceptions described below andelsewhere.

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

[2010-08-24] More consistent use of“block” and “block-level.” Change:

The :first-line pseudo-element can only be attached toablock-level element, inline-block, table-caption or atable-cellblock container element.

C.7.20Section 5.12.2 The :first-letter pseudo-element

[2010-08-24] More consistent use of“block” and “block-level.” Change:

The :first-letter pseudo-element applies toblock, list-item,table-cell, table-caption and inline-block elementsblockcontainer elements.

C.7.21Section 6.2 Inheritance

[2010-08-06] Add a note that, because itfollows the document tree, inheritance is not intercepted by anonymousboxes

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

[2010-10-05] Give other languages than HTML(such as SVG) the possibility to define certain attributes as“presentational attributes”:

For other languages, all document language-based stylingshouldbe handled in the user agent style sheetmust be translatedto the corresponding CSS and either enter the cascade at the useragent level or, as with HTML presentational hints, be treated asauthor level rules with a specificity of zero placed at the start ofthe author style sheet.

C.7.23Section 7.3 Recognized media types

[2010-09-08] Clarify what isignored. Change:

@media and @import rules with unknown media types(that arenonetheless valid identifiers) are treated as if the unknownmedia types are not present.If an @media/@import rule contains amalformed media type (not an identifier) then the statement isinvalid.

Note: Media Queries supercedesthis error handling.

C.7.24Section 8.3.1 Collapsing margins

[2010-05-12] Simplify/clarify text:

An element that hashad clearanceapplied toit nevercollapses

and:

When an element's own margins collapse, and that element hashad clearanceapplied to it

C.7.25Section 8.3.1 Collapsing margins

[2010-08-24] More consistent use of“block box” vs “block-level element.” Includetable captions in the set of block-level elements. Seealsochanges to 9.2.1 andto9.2.1.1.

Two or more adjoining vertical margins of block-levelboxes in the normal flow collapse.

and

The top margin of an in-flowblock-levelelementblock box is adjoining to its first in-flowblock-level child's top margin

and

The bottom margin of an in-flowblock-levelelementblock box with a 'height' of 'auto'

C.7.26Section 9.2.1 Block-level elements and block boxes

[2010-08-24] Define the term“block-level element” more precisely. Also defineauxiliary terms “block container box” and “blockbox”:

More consistent use of block box vs block-level element insection 9.2.1.1. See alsochanges tosection 8.3.1 and9.4.

C.7.27Section 9.2.1.1 Anonymous block boxes

[2010-05-12] The example has invalid HTMLmark-up. Change it to use P and SPAN elements instead of BODY and P.

[2010-08-06] Also clarify that “blockbox” only refers to boxes in the same flow.

C.7.28Section 9.2.1.1 Anonymous block boxes

[2010-09-29] Percentage values that referto dimensions of parent boxes ignore any intervening anonymousboxes. Add this paragraph:

Anonymous block boxes are ignored when resolving percentagevalues that would refer to it: the closest non-anonymous ancestor boxis used instead. For example, if the child of the anonymous block boxinside the DIV above needs to know the height of its containing blockto resolve a percentage height, then it will use the height of thecontaining block formed by the DIV, not of the anonymous blockbox.

C.7.29Section 9.2.1.1 Anonymous block boxes

[2010-09-29] Clarify the wording:

When an inline box contains an in-flow block box […] Whensuch an inline box is affected by relative positioning, the relativepositioning also affects the block-level boxcontained in theblock box.

C.7.30Section 9.2.1.1 Anonymous block boxes

[2010-10-13] Clarify that an inline boxthat is broken around a block-level box is always broken intotwo pieces, even if one or both are empty:

When an inline box contains an in-flow block-level box, the inlinebox (and its inline ancestors within the same line box) are brokenaround the block-level box, dividing the inline box into twopieces, even if either side is empty..

C.7.31Section 9.2.2 Inline-level elements and inline boxes

[2010-08-24] Better define the term“inline-level element/box” and define the auxiliary terms“inline box” and “atomic inline-level box.”

C.7.32Section 9.2.3 Run-in boxes

[2010-04-19] Make the definition of'run-in' more precise:

Arun-in box behaves as follows:

  1. If the run-in box contains a block box, the run-in boxbecomes a block box.
  2. If a sibling block box (that does not float and is notabsolutely positioned) follows the run-in box, the run-in box becomesthe first inline box of the block box. A run-in cannot run in to ablock that already starts with a run-in or that itself is arun-in.
  3. Otherwise, the run-in box becomes a block box.

Arun-in element (or pseudo-element)Abehaves as follows:

  1. IfA has any children that inhibit run-in behavior (see below), thenA is rendered as if it had 'display: block'.
  2. LetB be the first ofA's following siblings that is neither floating nor absolutely positioned nor has 'display: none'. IfB exists and has a specified value for 'display' of 'block' or 'list-item' and is not replaced, thenA is rendered as an 'inline' element at the start ofB's principal box. Note:A is rendered beforeB's ':before' pseudo-element, if any. See 12.1.
  3. Otherwise,A is rendered as if it had 'display: block'.

In the above, "siblings" and "children" include both normalelements and :before/:after pseudo-elements.

An element or pseudo-elementCinhibits run-inbehavior if one of the following is true. (Note that thedefinition is recursive.)

  1. C is not floating and not absolutely positioned and the computed value of its 'display' is one of 'block', 'list-item', 'table' or 'run-in'.
  2. C has a computed value for 'display' of 'inline' and it has one or more children that inhibit run-in behavior. (Where "children" includes both normal elements and :before/:after pseudo-elements.)

It remains undefined how 'run-in' and ':first-line' interact:

It is undefined in CSS 2.1 if a run-in inherits from a':first-line' pseudo-element.

C.7.33Section 9.2.4 The 'display' property

[2010-08-06] Use the same terminology as inchapter 12:

list-item
This value causes an element (e.g., LI in HTML) togenerate a principal block box and alist-item inlinemarker box.

C.7.34Section 9.2.4 The 'display' property

[2010-08-24] More consistent use of“inline-level.”

inline-block
This value causes an element to generateablock box, which itself is flowed as a single inline box, similar to areplaced elementan inline-level block container. Theinside of an inline-block is formatted as a block box, and the elementitself is formatted as aninline replaced elementanatomic inline-level box.

C.7.35Section 9.3 Positioning schemes

[2010-08-24] More consistent use of“inline-level” and “block-level.”

  1. Normal flow. In CSS 2.1, normal flow includes block formatting ofblock-level boxes, inline formatting ofinline-level boxes, relative positioning ofblock-levelorandinline-level boxes,andpositioningformatting of run-in boxes.

C.7.36Section 9.4 Normal flow

[2010-08-24] More consistent use of“inline-level” and “block-level.”

Boxes in the normal flow belong to a formatting context, which maybe block or inline, but not both simultaneously.Block-level boxes participate in a block formattingcontext. Inline-level boxes participate in an inlineformatting context.

In 9.4.1:

Floats, absolutely positioned elements,inline-blocks,table-cells, table-captions, and elements with 'overflow' other than'visible' (except when that value has been propagated to the viewport)establish new block formatting contextsblock containers(such as inline-blocks, table-cells, and table-captions) that are notblock boxes, and block boxes with 'overflow' other than'visible'.

In a block formatting context, boxes are laid out one after theother, vertically, beginning at the top of a containing block. Thevertical distance between two sibling boxes is determined by the'margin' properties. Vertical margins between adjacentblock-level boxes in a block formatting context collapse.

In 9.4.2:

[…] When several inline-level boxes cannot fithorizontally within a single line box, they are distributed among twoor more vertically-stacked line boxes.

When the total width of the inline-level boxes on a line[…]is less than the width of the line box containing them,their horizontal distribution within the line box is determined by the'text-align' property. If that property has the value 'justify', theuser agent may stretch spaces and words in inline boxes (exceptforbut not inline-table and inline-block boxes) aswell.

C.7.37Section 9.3.2 Box offsets: 'top', 'right', 'bottom', 'left'

[2010-07-19] If 'top', 'right', 'bottom' or'left' is specified as 'auto', theused value rather than thecomputed value is set to the negative of the oppositeside. For all four, change:

Computed value:for'position:relative', see section Relative Positioning. For'position:static', 'auto'. Otherwise: if specified as a length, thecorresponding absolute length; if specified as a percentage, thespecified value; otherwise, 'auto'.

And in section 9.4.3:

[…] Since boxes are not split or stretched as a result of'left' or 'right', thecomputedused values arealways: left = -right.

If both 'left' and 'right' are 'auto' (their initial values), thecomputedused values are '0' (i.e., the boxesstay in their original position).

If 'left' is 'auto', itscomputedused valueis minus the value of 'right' (i.e., the boxes move to the left by thevalue of 'right').

If 'right' is specified as 'auto', itscomputedused value is minus the value of 'left'.

[…] Since boxes are not split or stretched as a result of'top' or 'bottom', thecomputedused values arealways: top = -bottom. If both are 'auto', theircomputedused values are both '0'. If one of them is 'auto', itbecomes the negative of the other. If neither is 'auto', 'bottom' isignored (i.e., thecomputedused value of'bottom' will be minus the value of 'top').

C.7.38Section 9.5 Floats

[2010-08-24] More consistent use of“inline-level” and “block-level.”

[…] In other words, if inline-level boxes areplaced on the line before a left float is encountered that fits in theremaining line box space, the left float is placed on that line,aligned with the top of the line box, and then theinline-level boxes already on the line are movedaccordingly to the right of the float (the right being the other sideof the left float) and vice versa for rtl and right floats.

In 9.5.2:

Values have the following meanings when applied to non-floatingblock-level boxes:

C.7.39Section 9.5 Floats

[2010-10-25] Define exactly what it meansfor a line box to benext to a float:

[…] However, line boxes created next to the float areshortened to make room for the margin box of the float.

A line box is next to a float when there exists a verticalposition that satisfies all of these four conditions: (a) at or belowthe top of the line box, (b) at or above the bottom of the line box,(c) below the top margin edge of the float, and (d) above the bottommargin edge of the float.

Note: this means that floats with zero height ornegative height do not move line boxes.

C.7.40Section 9.5.2 Controlling flow next to floats: the 'clear'property

[2010-05-12] Clarify that 'clear' onlyintroduces clearance above an element if necessary; and that clearancemay have zero height.

C.7.41Section 9.5.2 Controlling flow next to floats: the 'clear'property

[2010-10-13] Added an example ofcalculating clearance from two collapsing margins M1 and M2 and theheight H of a float.

C.7.42Section 9.5.2 Controlling flow next to floats: the 'clear'property

[2010-10-13] Clarify the language:

Computing the clearance of an element on which 'clear' is set isdone by first determining the hypothetical position of the element'stop border edge within its parent block.This position isdetermined after the top margin of the element has been collapsed withprevious adjacent margins (including the top margin of the parentblock).This position where the actualtop border edge would have been if the element had a non-zero topborder and its 'clear' property had been 'none'.

If this hypothetical position of the element's top border edge isnot past the relevant floats, then clearancemust beis introduced, and margins collapse according to the rulesin 8.3.1.

Then the amount of clearance is set to the greater of:

  1. The amount necessary to place the border edge of the block evenwith the bottom outer edge of the lowest float that is to be cleared.
  2. The amount necessary to make the sum of the following equalto the distance to which these margins collapsed when the hypotheticalposition was calculated:
    • the margins collapsing above the clearance
    • the clearance itself
    • if the block's own margins collapse together: the block's topmargin
    • if the block's own margins do not collapse together: themargins collapsing below the clearance

    The amount necessary to place the top borderedge of the block at its hypothetical position.

C.7.43Section 9.5.2 Controlling flow next to floats: the 'clear'property

[2010-10-13] Correction: The hypotheticalposition is determined by assuming the box has a non-zerobottom border (see section 8.3.1):

This position is where the actual top border edge would have beenif the element had a non-zerotopbottom borderand its 'clear' property had been 'none'.

C.7.44Section 14.2.1 Background properties

[2010-04-19] 'Fixed' backgrounds in pagedmedia are positioned relative to the page box (and thus repeat onevery page, just like 'fixed' elements). The position of fixedbackgrounds in paged media was previously undefined.

C.7.45Section 9.9.1 Specifying the stack level: the 'z-index'property

[2010-07-07] Some ambiguities in thedescription of stacking contexts are fixed and the description isclearly marked as non-normative. (Appendix E holds the normativedescription.)

C.7.46Section 9.10 Text direction: the 'direction' and 'unicode-bidi'properties

[2010-08-24] More consistent use of“inline-level” and “block-level.”

User agents that support bidirectional text must apply the Unicodebidirectional algorithm to every sequence of inline-levelboxes uninterrupted by a forced line break or block boundary. Thissequence forms the "paragraph" unit in the bidirectional algorithm.The paragraph embedding level is set according to the value of the'direction' property of the containing block rather than by theheuristic given in steps P2 and P3 of the Unicode algorithm.

[…]

For the 'direction' property to affect reordering ininline-level elements, the 'unicode-bidi' property's valuemust be 'embed' or 'override'.

[…]

normal
The element does not open an additional level of embedding withrespect to the bidirectional algorithm. For inline-levelelements, implicit reordering works across element boundaries.
embed
If the element is inline-level, this valueopens an additional level of embedding with respect to thebidirectional algorithm. The direction of this embedding level isgiven by the 'direction'property. Inside the element, reordering is done implicitly. Thiscorresponds to adding a LRE (U+202A; for 'direction: ltr') or RLE(U+202B; for 'direction: rtl') at the start of the element and a PDF(U+202C) at the end of the element.
bidi-override
For inline-level elements this creates an override.Forblock-level, table-cell, table-caption, orinline-blockblock container elements this creates anoverride for inline-level descendants not within another block containerelement. This means thatinside the element, reordering is strictly in sequence according tothe 'direction' property; the implicit part of the bidirectionalalgorithm is ignored. This corresponds to adding a LRO (U+202D; for'direction: ltr') or RLO (U+202E; for 'direction: rtl') at the startof the element or at the start of each anonymous child block box, ifany, and a PDF (U+202C) at the end of the element.

The final order of characters in eachblock-levelelementblock container is […]

C.7.47Section 9.10 Text direction: the 'direction' and 'unicode-bidi'properties

[2010-10-05] Add a reference tobidiclass B in Unicode TR 9 to clarify what a “forcedbreak” is in the context of the Unicode bidi algorithm:

[…] inline-level boxes uninterrupted by a forcedline(bidiclass B) break or block boundary

C.7.48Section 9.10 Text direction: the 'direction' and 'unicode-bidi'properties

[2010-10-25] clarify “non-textualentities”:

In this process,non-textual entities such as imagesreplaced elements with 'display: inline' (and replaced elementswith 'display: run-in', when they generate inline-level boxes)are treated as neutral characters, unless their 'unicode-bidi'property has a value other than 'normal', in which case they aretreated as strong characters in the 'direction' specified for theelement.All other atomic inline-level boxes are treated asneutral characters always.

C.7.49Section 10.1 Definition of "containing block"

[2010-08-24] More consistent use of “inline-level” and “block-level.”

  1. […]
  2. For other elements, if the element's position is 'relative' or'static', the containing block is formed by the content edge of thenearestblock-level, table cell or inline-blockblockcontainer ancestor box.
  3. […]
  4. […]
    1. In the case that the ancestor isinline-levelan inline box, the containing block depends on the 'direction' property of the ancestor:

C.7.50Section 10.2 Content width: the 'width' property

[2010-05-12] The computed value of 'width'doesn't depend on whether the property applies or not:

Computed value: the percentage or 'auto' as specified or theabsolute length;'auto' if the property does not apply

C.7.51Section 10.2 Content width: the 'width' property

[2010-08-24] More consistent use of“inline-level” and “block-level.”

This property specifies the content width of boxesgeneratedby block-level and replaced elements.

This property does not apply to non-replacedinline-level elements.

C.7.52Section 10.2 Content width: the 'width' property

[2010-10-05] Remove unclear and redundantsentence:

The width of a replaced element's box is intrinsic and may bescaled by the user agent if the value of this property is differentthan 'auto'.

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

[2010-05-12] The computed value of 'height'doesn't depend on whether the property applies or not:

Computed value: the percentage or 'auto' (see prose under<percentage>) or the absolute length;'auto' if the propertydoes not apply

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

[2010-08-24] More consistent use of“inline-level” and “block-level.”

This property specifies the content height of boxesgeneratedby block-level, inline-block and replaced elements.

This property does not apply to non-replacedinline-level elements. See the section on computing heightsand margins for non-replaced inline elements for the rules usedinstead.

C.7.55Section 10.6.7 'Auto' heights for block formatting contextroots

[2010-08-06] Clarify “bottom”and “preceding”:

In certain cases (seethe preceding sectionse.g., sections 10.6.4 and 10.6.6), the height of an elementthat establishes a block formatting context is computed as follows:

[…]

In addition, if the element has any floating descendants whosebottom margin edge is below thebottomthe element'sbottom content edge, then the height is increased to includethose edges. Only floats that are children of the element itself or ofdescendants in the normal flow are taken into account, e.g., floatsinside absolutely positioned descendants or other floats are not.

C.7.56Section 10.7 Minimum and maximum heights: 'min-height' and'max-height'

[2010-10-26] The effect of 'min-height' and'max-height' on table cells is still undefined in CSS:

In CSS 2.1, the effect of 'min-height' and 'max-height'on tables, inline tables, table cells, table rows, and row groups is undefined.

C.7.57Section 10.8Line height calculations: the 'line-height' and 'vertical-align'properties

[2010-06-02] Clarifications to thecalculation of the line boxes and the minimum line height("strut"). Item 2 in the bulleted list is expanded and items 3 and 4are merged, as follows:

  1. The height of each inline box in the line box is calculated (see "Calculating heights and margins" and the 'line-height' property).
  2. The inline boxes are aligned vertically according to their 'vertical-align' property.In case they are aligned 'top' or 'bottom', they must be aligned so as to minimize the line box height. If such boxes are tall enough, there are multiple solutions and CSS 2.1 does not define the position of the line box's baseline (i.e., the position of the strut, see below).
  3. The line box height is the distance between the uppermost box top and the lowermost box bottom.(This includes the strut, as explained under 'line-height' below.)
  4. If the resulting height is smaller than the minimal height of line boxes for this block, as specified by the 'line-height' property, the height is increased to be that minimal height.

Furthermore, in 10.8.1, after the definition of“strut,” clarify that the font determines the initialbaseline:

The height and depth of the font above and below the baselineare assumed to be metrics that are contained in the font. (For moredetails, see CSS level 3.)

C.7.58Section 10.8Line height calculations: the 'line-height' and 'vertical-align'properties

[2010-08-24] More consistent use of“inline-level” and “block-level.”

As described in the section on inline formatting contexts, useragents flow inline-level boxes into a vertical stack ofline boxes. The height of a line box is determined as follows:

  1. The height of each inline-level box in the line box iscalculated (see "Calculating heights and margins" and the'line-height' property).
  2. The inline-level boxes are aligned vertically accordingto their 'vertical-align' property.

In 10.8.1:

On ablock-level, table-cell, table-caption orinline-blockblock container element whose content iscomposed of inline-level elements, 'line-height' specifiestheminimal height of line boxes within the element.[…]

On an inline-level element, 'line-height'specifies the height that is used in the calculation of the line boxheight […]

After the definition of 'vertical-align':

The following values only have meaning with respect to a parentinline-level element, or to the strut of aparentblock-level, table-cell, table-caption orinline-blockblock container element.

C.7.59Section 10.8.1Leading and half-leading

[2010-07-19] Clarify text:

On a block-level, table-cell, table-caption or inline-block elementwhose content is composed of inline-level elements, 'line-height'specifies the minimal height of line boxes within the element. Theminimum height consists of a minimum height above theblock's baseline and a minimum depth below it, exactly asif each line box starts with a zero-width inline box with theblock'selement's font and line heightproperties.(what TEX calls a "strut").We call thatimaginary box a "strut." (The name is inspired by TeX.).

C.7.60Section 10.8.1Leading and half-leading

[2010-08-20] Remove text that talks aboutthe “content area” of an inline box and about“center vertically” and instead make it more explicit howleading is added to a glyph: leading is added above and below ahypothetical box around each glyph that represents the (normal orideal) height of a line of text in that font, as given in the fontmetrics.

Add a note referring to 10.6.1 (which defines that the content areais undefined) and explaining that the exact position of backgroundsand borders relative to the line box is undefined.

Also add a note about how to find the relevant metrics in OpenTypeand TrueType fonts.

C.7.61Section 10.8.1Leading and half-leading

[2010-08-20] Clarify some imprecise terms:

When an element contains text that is rendered in more than onefont, user agents may determine the'normal' 'line-height'value according to the largest font size.

Generally, when there is only one value of 'line-height' for allinline boxes in aparagraphblock container box (andnotall imagesreplaced elements, inline-blockelements, etc.), the above will ensure that baselines ofsuccessive lines are exactly 'line-height' apart. This is importantwhen columns of text in different fonts have to be aligned, forexample in a table.

C.7.62Section 11.1 Overflow and clipping

[2010-10-25] Clarify which ancestors aremeant:

C.7.63Section 11.1.1 Overflow: the 'overflow' property

[2010-08-06] The phrase “containingblock” in the example doesn't refer to the technical term“containing block” but simply to the containingbox. Change “containingblock” to“containingdiv.”

C.7.64Section 11.1.1 Overflow: the 'overflow' property

[2010-08-24] More consistent use of“inline-level” and “block-level.”

This property specifies whether content ofablock-levelblock container element is clippedwhen it overflows the element's box.

C.7.65Section 11.1.1 Overflow: the 'overflow' property

[2010-10-25] Add missing inline-table:

Applies to:non-replaced block-level elements, tablecells,inline-table, and inline-block elements

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

[2010-10-25] The computed value of 'auto'is 'auto' also when 'auto' is specified inside 'rect()':

Computed value:For rectangle values, a rectangle consisting of four computedlengths; otherwise, as specified'auto' if specified as'auto', otherwise a rectangle with four values, each of which is'auto' if specified as 'auto' and the computed length otherwise

And:

<top>, <right>, <bottom>, and <left> may either have a<length> value or 'auto'. Negative lengths are permitted. The value'auto' means that a given edge of the clipping region will be the sameas the edge of the element's generated border box (i.e., 'auto' meansthe same as '0' for <top> and <left> (in left-to-right text,<right> in right-to-left text), the same as thecomputedused value of the height plus the sum of vertical paddingand border widths for <bottom>, and the same as thecomputedused value of the width plus the sum ofthe horizontal padding and border widths for <right> (inleft-to-right text, <left> in right-to-left text), such that four'auto' values result in the clipping region being the same as theelement's border box).

C.7.67Section 12.5 Lists

[2010-10-05] Improve wording: the markerbox of a list item isn't “optional,” it is sometimesabsent. Change:

CSS 2.1 offers basic visual formatting of lists. An element with'display: list-item' generates a principal box for the element'scontentand an optional marker boxand, depending on the values of 'list-style-type' and'list-style-image', possibly also a marker boxas a visual indication that the element is a list item.

C.7.68Section 12.5.1 Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

[2010-07-14] Because of persistentincompatibilites between implementations, the constraints on theposition of 'outside' markers are relaxed in the presence offloats. This will be fixed in a future specification.

C.7.69Section 12.5.1 Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

[2010-08-06] The 'armenian' list-style-typerefers touppercase Armenian numbering.

C.7.70Section 12.5.1 Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

[2010-08-06] Define the order of 'inside'marker boxes and ':before' pseudo-elements:

inside
The marker box isplaced asthe first inline box in the principal block box,after which theelement's content flows before the element's content andbefore any :before pseudo-elements.

C.7.71Section 12.5.1 Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

[2010-08-06] CSS 2.1 does not specifythe precise location of an 'outside' marker box,includingits z-order. Append:

CSS 2.1 does not specify the precise location of the markerboxor its position in the painting order

C.7.72Section 12.5.1 Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

[2010-11-25] Because of historicalambiguity, CSS level 2 does not yet require the marker to bevisible when 'list-style-position' is 'outside' and 'overflow' isother than 'visible'. Insert in the definition of 'outside':

In CSS 2.1, a UA may hide the marker if the element's'overflow' is other than'visible'. (This is expected to change in the future.)

C.7.73 Section 13.2Page boxes: the @page rule

[2010-07-07] The @page rule can contain notjust declarations but also other @-rules. (There aren't any suchnested @-rules defined in level 2, but there are inlevel 3.)

An @page rule consists of the keyword "@page", followed by anoptional page selector, followed by a blockof declarationscontaining declarations and at-rules.

Note: CSS level 2 has no at-rules that may appear inside@page, but such at-rules are expected to be defined inlevel 3.

And add just above section 13.2.1:

The rules for handling malformed declarations, malformedstatements, and invalid at-rules inside @page are as defined insection 4.2, with the following addition: when the UA expects thestart of a declaration or at-rule (i.e., an IDENT token or anATKEYWORD token) but finds an unexpected token instead, that token isconsidered to be the first token of a malformed declaration. I.e., therule for malformed declarations, rather than malformed statements isused to determine which tokens to ignore in that case.

C.7.74Section 13.2.2 Page selectors: selecting left, right, and firstpages

[2010-10-25] Whether the first page of adocument is :left or :right depends on the major writingdirection. Give an example ofhow:

All pages are automatically classified by user agents into eitherthe :left or :right pseudo-class.Whether the first page of adocument is :left or :right depends on the major writing direction ofthe root element. For example, the first page of a document with aleft-to-right major writing direction would be a :right page, and thefirst page of a document with a right-to-left major writing directionwould be a :left page. To explicitly force a document to beginprinting on a left or right page, authors can insert a page breakbefore the first generated box.

And in 13.3.1:

Whether the first page of a document is :left or :rightdepends on the major writing direction of the document.

C.7.75Section 13.3.2 Breaks inside elements: 'orphans','widows'

[2010-08-24] More consistent use of“inline-level” and “block-level.” Change forboth 'orphans' and 'widows':

Applies to:block-levelblockcontainer elements

And change:

The 'orphans' property specifies the minimum number of lines in ablockelementcontainer that must be left at thebottom of a page. The 'widows' property specifies the minimum numberof lines in a blockelementcontainer that mustbe left at the top of a page. Examples of how they are used to controlpage breaks are given below.

C.7.76Section 13.3.3 Allowed page breaks

[2010-08-24] More consistent use of“inline-level” and “block-level.” Change:

  1. In the vertical margin between block-level boxes. […]
  2. Between line boxes inside a blockcontainer box.
  3. Between the content edge of a blockcontainer box andthe outer edges of its child content […]

C.7.77Section 15.3 Font family: the 'font-family' property

[2010-07-19] The specification wasambiguous as to whether parentheses, brackets and braces in font namesmustalways be escaped, or only when needed to conform to thesyntax for declarations. Because of that, and because of the many bugsin implementations,all font names must now either be quoted,or be escaped so as to consist of only identifiers.

C.7.78Section 15.3.1 Generic font families

[2010-08-26] Make it clearer that CSS doesnot try to define what fonts are serif or sans-serif:

15.3.1.1 serif

Glyphs of serif fonts, as the term is used in CSS,tendto have finishing strokes, flared or tapering ends, or haveactual serifed endings (including slab serifs). [&hellip]

15.3.1.2 sans-serif

Glyphs in sans-serif fonts, as the term is used in CSS,tendto have stroke endings that are plain –withoutanywith little or no flaring, cross stroke, or otherornamentation. […]

C.7.79Section 15.6 Font boldness: the 'font-weight' property

[2010-04-19] The meaning of the keywords'bolder' and 'lighter' no longer depends on both the inherited weightand the actually used font, but only on the inherited weight.

C.7.80Section 15.6 Font boldness: the 'font-weight' property

[2010-10-13] Clarify the algorithm formapping CSS font weight values to the actual weights of a font andmake it normative:

The association of other weights within a family to the numericalweight values is intended only to preserve the ordering of darknesswithin that family. However, the following heuristics tell how theassignment is done in typical cases:

Once the font family's weights are mapped onto the CSS scale,missing weights are selected as follows:

C.7.81Section 15.7 Font size: the 'font-size' property

[2010-08-06] Changed “Percentages:refer toparent element's font size” to“Percentages: refer toinherited font size” sothat it uses the same terminology asSection 4.3.3.

C.7.82Section 16.1 Indentation: the 'text-indent' property

[2010-08-24] More consistent use of“inline-level” and “block-level.” Change:

Applies to:block-level elements, tablecells and inline blocksblock containers

[…]

This property specifies the indentation of the first line of textin a blockcontainer.

C.7.83Section 16.1 Indentation: the 'text-indent' property

[2010-10-25] Clarify that the “firstline” of the “first box,” etc., is the same as the“first formatted line” of chapter 5:

'Text-indent' only affects a line if it is the first formattedline of an element. For example, the first line of an anonymous blockbox is only affected if it is the first child of its parentelement.

C.7.84Section 16.2 Alignment: the 'text-align' property

[2010-07-19] The value 'pre-line' of'white-space' doesnot inhibit justification. (Only linesthat end with an explicit newline aren't justified, as is the case forany value of 'white-space'.) But, 'pre-wrap'does inhibitjustification. Replace

If the computed value of text-align is 'justify' while thecomputed value of white-space is 'pre' or 'pre-line', the actual valueof text-align is set to the initial value.

with

If an element has a computed value for 'white-space' of 'pre'or 'pre-wrap', then neither the glyphs of that element's text contentnor its white space may be altered for the purpose ofjustification.

C.7.85Section 16.2 Alignment: the 'text-align' property

[2010-08-24] More consistent use of“inline-level” and “block-level.” Change:

Applies to:block-level elements, tablecells and inline blocksblock containers

This property describes how inline-level content of ablockcontainer is aligned.

And:

[…] In the case of 'left', 'right' and 'center', thisproperty specifies how the inline-level boxes within eachline box align with respect to the line box's left and right sides;alignment is not with respect to the viewport. In the case of'justify', this property specifies that the inline-levelboxes are to be made flush with both sides of theblockcontainer if possible, by expanding or contractingthe contents of inline boxes, else aligned as for the initial value.

C.7.86Section 16.3.1 Underlining, overlining, striking, and blinking: the 'text-decoration' property

[2010-08-24] Clarify that 'text-decoration'does not propagate to inline-table and inline-block elements. Change:

This property describes decorations that are added to the text ofan element using the element's color. When specified onan inlineelement, it affects all the boxes generated by that element; for allother elements, the decorations are propagated to an anonymous inlinebox that wraps all the in-flow inline children of the element, and toany block-level in-flow descendants. It is not, however, furtherpropagated to floating and absolutely positioned descendants, nor tothe contents of 'inline-table' and 'inline-block'descendants.or propagated to an inline element, it affectsall the boxes generated by that element, and is further propagated toany in-flow block-level boxes that split the inline (seesection 9.2.1.1). For block containers that establish an inlineformatting context, the decorations are propagated to an anonymousinline element that wraps all the in-flow inline-level children of theblock container. For all other elements it is propagated to anyin-flow children. Note that text decorations are not propagated tofloating and absolutely positioned descendants, nor to the contents ofatomic inline-level descendants such as inline blocks and inlinetables.

and:

If an element contains no text, user agents must refrain fromrendering these text decorations on the element. For example, imageswill not be underlined. User agents must not render thesetext decorations on content that is not text. For example, images andinline blocks must not be underlined.

C.7.87Section 16.3.1 Underlining, overlining, striking, and blinking:the 'text-decoration' property

[2010-10-05] CSS 2.1 does not specifyif a text decoration that is specified on a transparent element('visibility: hidden') is itself transparent, or only transparentwhere the text is transparent. Add this note:

Note. If an element E has both 'visibility:hidden' and 'text-decoration: underline', the underline is invisible(although any decoration of E's parentis visible.) However, CSS 2.1 does not specify if the underline is visible orinvisible in E's children:

<span> <span>  underlined or not? </span></span>

This is expected to be specified in level 3 ofCSS.

C.7.88Section 16.4 Letter and word spacing: the 'letter-spacing' and'word-spacing' properties

[2010-04-19] Word spacing does not affectfixed-width spaces. Change:

Word spacing affects each space (U+0020), andnon-breaking space (U+00A0)and ideographic space (U+3000),left in the text after the white space processing rules have beenapplied.The effect of the property on other word-separatorcharacters is undefined. However general punctuation, characters withzero advance width (such as the zero with space U+200B) andfixed-width spaces (such as U+3000 and U+2000 through U+200A) are notaffected.

C.7.89Section 16.6 White space: the 'white-space' property

[2010-10-25] If the document languagespecifies how newlines are represented, those newlines must be passedto the CSS UA as line feed (LF) characters. If the document languagedoes not define how newlines are expressed (e.g., if text is insertedwith the 'content' property), the CSS UA must treat CR, and CRLF as ifthey were LF:

Newlines in the source can be represented by a carriage return(U+000D), a linefeed (U+000A) or both (U+000D U+000A) or by some othermechanism that identifies the beginning and end of document segments,such as the SGML RECORD-START and RECORD-END tokens. The CSS'white-space' processing model assumes all newlines have beennormalized to line feeds.UAs that recognize other newlinerepresentations must apply the white space processing rules as if thisnormalization has taken place. If no newline rules are specified forthe document language, each carriage return (U+000D) and CRLF sequence(U+000D U+000A) in the document text is treated as single line feedcharacter. This default normalization rule also applies to generatedcontent.

[…]

  1. Each tab (U+0009),carriage return (U+000D), or space(U+0020) character surrounding a linefeed (U+000A) character isremoved if 'white-space' is set to 'normal', 'nowrap', or 'pre-line'.

C.7.90Section 16.6.1 The 'white-space' processing model

[2010-08-06] The sentence that absolutelypositioned elements do not create line breaking opportunities isnormative, not informative.

C.7.91Section 16.6.1 The 'white-space' processing model

[2010-08-06] The first paragraph is movedto 9.2.2.1. Also, as is clear from the latter section, the“should” is a “must”:

Any text that is directly contained inside a blockcontainerelement (not inside an inline element)shouldmust be treated as an anonymous inline element.

C.7.92Section 16.6.1 The 'white-space' processing model

[2010-08-24] More consistent use of“inline-level” and “block-level.” Change:

Then, theentire block is renderedblockcontainer's inlines are laid out.

C.7.93Section 17.2 The CSS table model

[2010-08-04] Clarify that the term“row group” includes header groups and footer groups aswell:

Thus, the table model consists of tables, captions, rows, rowgroups(including header groups and footer groups),columns, column groups, and cells.

C.7.94Section 17.2.1 Anonymous table objects

[2010-08-24] XML and HTML5, unlike SGML, donot automatically remove insignificant white space. Change the rulesfor generating anonymous table elements to suppress most white spacebetween elements, rather than consider it the content of an anonymoustable cell.

C.7.95Section 17.2.1 Anonymous table objects

[2010-08-24] The static position ofabsolutely positioned elementsbetween table cells or rowswas not very useful. Define that the static position of such anelement is found not just as if the element had 'position: static',but alsohad 'display: inline' and zero width and height.

C.7.96Section 17.4 Tables in the visual formatting model

[2010-04-19] The caption of the image stilldescribes the image as it was in the previous version. Change:

Diagram of a table with a caption above it; the top margin ofthe caption is collapsed with the top margin of the table.

C.7.97Section 17.4 Tables in the visual formatting model

[2010-10-13] Clarify which of the two boxesgenerated by a table element is the principal box:

In both cases, the tablebox generatesan anonymousboxa principal block box called thetable wrapperbox that contains the table box itself and any captionboxes (in document order).Thetable box is ablock-level box that contains the table's internal table boxes.The caption boxes are block-level boxes that retain their own content,padding, margin, and border areas, and are rendered as normalblocksblock boxes inside theanonymoustable wrapper box. Whether the captionboxes are placed before or after the table box is decided by the'caption-side' property, as described below.

Theanonymoustable wrapper box is a 'block'box if the table is block-level, and an 'inline-block' box if thetable is inline-level. Theanonymoustable wrapperbox establishes a block formatting context. The table box (not theanonymoustable wrapper box) is used when doingbaseline vertical alignment for an 'inline-table'. The width of theanonymoustable wrapper box is the border-edgewidth of the table box inside it, as described by section17.5.2. Percentages on 'width' and 'height' on the table are relativeto theanonymoustable wrapper box's containingblock, not theanonymoustable wrapper box itself.

The computed values of properties 'position', 'float', 'margin-*','top', 'right', 'bottom', and 'left' on the table box are used on theanonymoustable wrapper box instead of the tablebox. The table box uses the initial values for those properties.

C.7.98Section 17.5.2.2 Automatic table layout

[2010-10-25] The width of the table captioncontributes to the width of the table if 'table-layout' is 'auto':

This gives a maximum and minimum width for each column.

The caption width minimum (CAPMIN) is determined bycalculating for each caption the minimum caption outer width as theMCW of a hypothetical table cell that contains the caption formattedas "display: block". The greatest of the minimum caption outer widthsis CAPMIN.

Columnand captionwidths influence the final table width as follows:

  1. If the 'table' or 'inline-table' element's 'width' property has a computed value (W) other than 'auto', theproperty's value as used for layoutused width is the greater of W, CAPMIN, and the minimum width required by all the columns plus cell spacing or borders (MIN). IfWthe used widthis greater than MIN, the extra width should be distributed over the columns.
  2. If the 'table' or 'inline-table' element has 'width: auto', thetable width used for layoutused width is the greater of the table's containing block width, CAPMIN, and MIN. However, ifeither CAPMIN or the maximum width required by the columns plus cell spacing or borders (MAX) is less than that of the containing block, useMAXmax(MAX, CAPMIN).

C.7.99Section 17.5.3 Table height algorithms

[2010-07-15] Clarify that the height of atable row can be influenced by 'vertical-align' and 'height', but thecontent box of the table cell is not affected.

[…] it is the maximum of the row's specified 'height',the specified 'height' of each cell in the row, and theminimum height (MIN) required by the cells

and

In CSS 2.1, the height of a cell box is themaximum of thetable cell's 'height' property and the minimum height required by thecontent (MIN).minimum height required by the content. Thetable cell's 'height' property can influence the height of the row,but it does not increase the height of the cell box.Avalue of 'auto' for 'height' implies that the value MIN will be usedfor layout.

C.7.100Section 17.5.4 Horizontal alignment in a column

[2010-08-24] More consistent use of“inline-level.” Change:

The horizontal alignment ofa cell's inlinecontentinline-level content within a cell box

C.7.101Section B.2 Informative references

[2010-08-06] BCP 47 replacesRFC 3066.

C.7.102Section D. Default style sheet for HTML 4

[2010-10-05] HTML defines that HTML's blockelements represent a Unicode embedding even if they are displayedinline by means of a style sheet. The default style sheet for HTMLdidn't yet express that. Add:

html, address,blockquote,body, dd, div,dl, dt, fieldset, form,frame, frameset,h1, h2, h3, h4,h5, h6, noframes,ol, p, ul, center,dir, hr, menu, pre   { display: block;unicode-bidi: embed }

C.7.103Section E.2 Painting order

[2010-07-07] Clarification:

Thestacking order forpainting order for thedescendants of an element generating a stacking context (see the'z-index' property) is: […]

C.7.104Appendix G Grammar of CSS 2.1

[2010-10-25] The appendix is not normative.

C.8 Changes since the working draft of 7 December 2010

C.8.18.3.1Collapsing margins

The section is completely rewritten to make the normative textshorter and clearer.

C.8.210.8.1 Leadingand half-leading

The remark about equal line spacing is made more precise and put ingreen, to make it clearer that it is a note:

Generally,Note. when there is only one value of'line-height' for all inline boxes in a block container boxandthey are all in the same font (andthere are noreplaced elements, inline-block elements, etc.), the above will ensurethat baselines of successive lines are exactly 'line-height'apart. This is important when columns of text in different fonts haveto be aligned, for example in a table.

C.8.310.3Calculating widths and margins

Added a note that the width calculation only yields a tentativevalue, still to be compared to 'min-width' and 'max-width'

Note. The used value of'width' calculated below is a tentative value, and may have to becalculated multiple times, depending on 'min-width' and 'max-width',see the section Minimum and maximum widths below.

A similar note is added to section 10.6 about calculatingheights.

C.8.4 14.3Gamma correction

The section on gamma correction was removed. It existed only tohelp implementations on certain operating systems of the 1990s.

C.8.511.1.2 Clipping:the 'clip' property

The 2nd and 4th offsets of the clip rectangle are offsets from theleft edge of the element. The 'direction' property no longer has aninfluence.

C.8.69.4.2Inline formatting contexts

The words "line feed" were a typing error. The intended words are"forced line break."

(The sentence was subsequently changed further as a result ofanother issue.)

C.8.710.3.2Inline, replaced elements

No image formats were found that allow an intrinsic size to beexpressed as a percentage. The relevant definitions are removed:

Percentage intrinsic widths are first evaluated with respectto the containing block's width, if that width does not itself dependon the replaced element's width. If it does, then the resulting layoutis undefined in CSS 2.1.

Similarly in10.6.2:

Percentage intrinsic heights are evaluated with respect to thecontaining block's height, if that height is specified explicitly, orif the replaced element is absolutely positioned. If neither of theseconditions is met, then percentage values on such replaced elementscannot be resolved and such elements are assumed to have no intrinsicheight.

And in12.5.1:

2. If the image's intrinsic width or height is given as apercentage, then that percentage is resolved against 1em.

C.8.810.1Definition of "containing block"

In CSS 2.1, it is undefined what the containing block of anabsolutely positioned element is, if its nearest positioned ancestoris inline and split over multiple lines:

4. If the element has 'position: absolute' [&hellip] following way;

  1. In the case that the ancestor is aninline boxinline-level element, the containing blockdepends onthe'direction' property ofthe ancestor:is the bounding box around the padding boxesof the first and thelast inline boxes generated for that element. In CSS 2.1, if theinline element is split across multiple lines, the containingblock is undefined.
    1. If the'direction' is'ltr', the top and left of the containing block are the top and leftpadding edges of the first box generated by the ancestor, and thebottom and right are the bottom and right padding edges of the lastbox of the ancestor.
    2. If the'direction' is'rtl', the top and right are the top and right padding edges of thefirst box generated by the ancestor, and the bottom and left are thebottom and left padding edges of the last box of the ancestor.

    Note: This may cause the containing block's widthto be negative.

C.8.913.2.2 Pageselectors: selecting left, right, and first pages

CSS 2.1 does not define if ':first' applies to the first page orthe first non-blank page:

If a forced break occurs before the first generated box, it isundefined in CSS 2.1 whether ':first' applies to the blank pagebefore the break or to the page after it.

C.8.108.3.1Collapsing margins

Added a note with a link to 9.4.2, which defines types of line boxesthat exist but do not interfere with collapsing margins.

C.8.1110.8 Lineheight calculations: the 'line-height' and 'vertical-align'properties

The definition of which height is used for the different kinds ofinline-level boxes is made explicit, rather than linked:

  1. The height of each inline-level box in the line box is calculated.For replaced elements, inline-block elements, and inline-tableelements, this is the height of their margin box; for inline boxes,this is their 'line-height'.(See"Calculatingheights and margins" and the'line-height' propertyheight of inlineboxes in"Leading andhalf-leading".)

The part of the definition that was in10.6.2 is removed:

For 'inline' and 'inline-block' elements, the margin box isused when calculating the height of the line box.

C.8.1210.8.1Leading and half-leading

Inserted the following before the definitions of the keywords of'vertical-align' to define precisely which box is aligned:

In the following definitions, for inline non-replacedelements, the box used for alignment is the box whose height is the'line-height' (containing the box's glyphs and the half-leading oneach side, seeabove). For all otherelements, the box used for alignment is the margin box.

Also, to make sure there always is a box whose height is'line-height', a phrase earlier in the same section was removed:

User agent must align the glyphs in a non-replaced inline box toeach other by their relevant baselines, and to nested inlineboxes according to 'vertical-align'.

And another modified:

The height of the inline boxis then the smallest such that itencloses all glyphs and their leading, as well as all nested inlineboxes.encloses all glyphs and their half-leading on eachside and is thusexactly 'line-height'. Boxes of child elements do not influence thisheight.

C.8.1310.6.1Inline, non-replaced elements

Improve language:

The vertical padding, border and margin of an inline, non-replacedbox start at the top and bottom of the contentarea,notand has nothing to do with the'line-height'. But only the 'line-height' is used when calculating theheight of the line box.

C.8.149.5.1Positioning the float: the 'float' property

A left float must not only not overlap a right float, but must alsonot be completely to the right of it.

3. The rightouter edge of aleft-floating box may not be to the right of theleftouter edge of anyright-floating box that isto the right ofnextto it. Analogous rules hold for right-floating elements.

C.8.159.2.1.1Anonymous block boxes

An error in the description of the example:

The resulting boxes would bean anonymous block boxarounda block box representing the BODY, containing ananonymous block box around C1, the SPAN block box, and anotheranonymous block box around C2.

C.8.165.12.1 The :first-line pseudo-element

UAs are not required to support 'vertical-align' on '::first-line'.

The following properties apply to a :first-line pseudo-element:font properties, color property, background properties,'word-spacing', 'letter-spacing', 'text-decoration','vertical-align', 'text-transform',and'line-height'. UAs may apply other properties as well.

C.8.1716.6 White space: the 'white-space' property

CSS 2.1 does not define whether the Line Separator characterin Unicode and other forced line break characters (other than LF)cause a line break. (Level 3 will probably define this indetail.)

pre
This value prevents user agents from collapsing sequencesof white space. Lines are only broken atnewlines in the source,or at occurrences of "\A" in generated contentpreservednewline characters.

and

pre-wrap
This value prevents user agents from collapsingsequences of white space. Lines are broken atnewlines in thesource, at occurrences of "\A" in generated content,preserved newline characters, and as necessary to fill lineboxes.
pre-line
This value directs user agents to collapse sequencesof white space. Lines are broken atnewlines in the source, atoccurrences of "\A" in generated content,preserved newlinecharacters, and as necessary to fill line boxes.

and add this paragraph:

UAs must recognize line feeds (U+000A) as newlinecharacters. UAs may additionally treat other forced break charactersas newline characters per UAX14.

C.8.1812.5.1Lists: the 'list-style-type', 'list-style-image','list-style-position', and 'list-style' properties

CSS 2.1 omits to define how the implicit counters of'list-item' are reset and incremented. This will be specified inlevel 3.

CSS 2.1 does not define how the list numbering is reset andincremented. This is expected to be defined in the CSS List Module[CSS3LIST].

C.8.199.7Relationships between 'display', 'position', and 'float'

Some UAs treat 'display: list-item' on the root element as'block'. Allow that behavior for now:

4. Otherwise, if the element is the root element, 'display' is setaccording to the table below, except that it is undefined inCSS 2.1 whether a specified value of 'list-item' becomes acomputed value of 'block' or 'list-item'.

C.8.209.4.2Inline formatting contexts

Empty line boxes aren't generated at all, rather than just ignoredfor margin collapsing. But their virtual position must still becalculated if they contain empty inlines with absolutely positioned orfloating descendants:

Line boxes are created as needed to hold inline-level contentwithin an inline formatting context. Line boxes that contain notext, nopreserved whitespace, no inline elements with non-zero margins, padding, orborders, and no otherin-flowcontent (such as images, inline blocks or inline tables), and do notend with aline feedpreserved newline must betreated as zero-height line boxesfor the purposes of determiningthe positions of any elements inside of them, and treated as notexisting for any other purpose.For the purposes ofmargin collapsing, this line box must be ignored.

C.8.214.1.9Comments

Use same phrasing for comment tokens as insection 4.1.1:

They may occur anywherebetweenoutside othertokens

C.8.2212.5.1 Lists:the 'list-style-type', 'list-style-image', 'list-style-position', and'list-style' properties

The size computation of list marker images without an intrinsicsize is modified to be consistent with how image sizes are computed inother places, using 1em for the available width and 1:1 for thedefault aspect ratio:

  1. If the image has an intrinsic width or height, then thatintrinsic width/height becomes the image's used width/height.If the image has a intrinsic width and height, the used width andheight are the intrinsic width and height.
  2. If the image has no intrinsic ratio and a ratio cannot becalculated from its width and height, then its intrinsic ratio isassumed to be 1:1.Otherwise, if the image has an intrinsicratio and either an intrinsic width or an intrinsic height, the usedwidth/height is the same as the provided intrinsic width/height, andthe used value of the missing dimension is calculated from theprovided dimension and the ratio.
  3. If the image has a width but no height, its height iscalculated from the intrinsic ratio.Otherwise, if theimage has an intrinsic ratio, the used width is 1em and the usedheight is calculated from this width and the intrinsic ratio. If thiswould produce a height larger than 1em, then the used height isinstead set to 1em and the used width is calculated from this heightand the intrinsic ratio.
  4. If the image's height cannot be resolved from the rulesabove, then the image's height is assumed to be 1em.Otherwise, the image's used width is its intrinsic width if ithas one, or else 1em. The image's used height is its intrinsic heightif it has one, or else 1em.
  5. If the image has no intrinsic width, then its width iscalculated from the resolved height and the intrinsic ratio.

C.8.239.5.1Positioning the float: the 'float' property

Because of lack of sufficient implementations, the top of afloating box is allowed to be above the top of earlier boxes incertain difficult cases. Add after the numbered list:

But in CSS 2.1, if, within the block formatting context,there is an in-flow negative vertical margin such that the float'sposition is above the position it would be at were all such negative marginsset to zero, the position of the float is undefined.

C.8.249.3Positioning schemes

Add formal definitions of the terms “out of flow,”“in-flow” and “flow of an element”:

An element is calledout of flow if it is floated,absolutely positioned, or is the root element. An element is calledin-flow if it is not out-of-flow. Theflow of anelementA is the set consisting ofA andall in-flow elements whose nearest out-of-flow ancestor isA.

C.8.259.10 Textdirection: the 'direction' and 'unicode-bidi' properties

The list of features affected by 'direction' is not meant to beexclusive:

This property specifies the base writing direction of blocks andthe direction of embeddings and overrides (see'unicode-bidi') for the Unicodebidirectional algorithm. In addition, it specifiessuch thingsas the direction oftable columnlayout, the direction of horizontaloverflow, the position of anincomplete last line in a block in case of 'text-align: justify'.

C.8.2616.3.1Underlining, overlining, striking, and blinking: the 'text-decoration'property

Whether the effect of 'text-decoration' propagates into tables maybe the subject of a separate property in level 3:

[…] When specified on or propagated to an inline element, itaffects all the boxes generated by that element, and is furtherpropagated to any in-flow block-level boxes that split the inline (seesection 9.2.1.1).But, in CSS 2.1, it is undefinedwhether the decoration propagates into block-level tables.

C.8.2716.3.1Underlining, overlining, striking, and blinking: the 'text-decoration'property

Clarify that the text for 'inset' and 'outset' only talks about howthe border styles look (and not, e.g., about which style takespriority):

*inset
In the separated borders model, the border makes the entire box look as though it were embedded in the canvas. In the collapsing border model,drawn the same as 'ridge'.
*outset
In the separated borders model, the border makes the entire box look as though it were coming out of the canvas. In the collapsing border model,drawn the same as 'groove'.

C.8.2810.4Minimum and maximum widths: 'min-width' and 'max-width'

Added:

In CSS 2.1, the effect of 'min-width' and 'max-width' ontables, inline tables,table cells, table columns, and column groups is undefined.

C.8.299.3.2 Boxoffsets: 'top', 'right', 'bottom', 'left'

'Top', right', 'bottom' and 'left' are always computed, independentof the value of other properties:

'top'
Value:  <length> |<percentage> | auto |inherit
Initial:  auto
Applies to:  positioned elements
Inherited:  no
Percentages:  refer to height of containing block
Media:  visual
Computed value:  for 'position:static', 'auto'. Otherwise:if specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, 'auto'.

Analogously for 'right', 'bottom' and 'left'.

C.8.309.2.1.1Anonymous block boxes

Clarify that the two parts of an inline that is split by a blockare on opposite sides of the block:

When an inline box contains an in-flow block-level box, the inlinebox (and its inline ancestors within the same line box) are brokenaround the block-level box (and any block-level siblings that areconsecutive or separated only by collapsible whitespace and/orout-of-flow elements),dividingsplitting theinline box into two pieces (even if either side is empty), one oneach side of the block-level box(es).

C.8.3117.4 Tables in thevisual formatting model

More precise rule for which properties apply to the table box andwhich to the table wrapper box:

The computed values of properties 'position', 'float', 'margin-*','top', 'right', 'bottom', and 'left' on the tableboxelement are used on the table wrapper boxinsteadofand not the table box. The table box uses theinitial values for those properties.; all other values ofnon-inheritable properties are used on the table box and not the tablewrapper box. (Where the table element's values are not used on thetable and table wrapper boxes, the initial values are usedinstead.)

C.8.3211.1.2 Clipping:the 'clip' property

Some text and arrows were added to the example to make it easier tosee where the four offsets of the clip rectangle are applied:

Two clipping regions   [D]

C.8.3313.2 Page boxes:the @page rule

The definition of the @page rule didn't mention explicitly (exceptwith examples) that white space is allowed:

An @page rule consists of the keyword "@page", followed by anoptional page selector, followed by a block containing declarationsand at-rules.Comments and white space are allowed, but optional,between the @page token and the page selector and between the pageselector and the block.

C.8.344.1.1Tokenization

Added an example to illustrate what is meant by “the longestmatch” in the tokenizer:

Example(s):

For example, the rule of the longest match means that"red-->" is tokenized as the IDENT "red--"followed by the DELIM ">", rather than as an IDENTfollowed by a CDC.

C.8.354.2 Rulesfor handling parsing errors

Clarify that “end of line” means an end of linecharacter, i.e., the end of file is not an end of line:

User agents must close strings upon reaching the end of a line(i.e., before an unescaped line feed, carriage return orform feed character), but then drop the construct (declarationor rule) in which the string was found.

C.8.363.1Definitions

There may soon be a newer version of HTML then HTML4:

An HTML user agent is one that supportsone or more of theHTML2.x, HTML 3.x, or HTML 4.x specifications. A useragent that supports XHTML [XHTML], but not HTML(as listed in theprevious sentence) is not considered an HTML user agent for thepurpose of conformance with this specification.

C.8.374.3.4 URLs andURIs

Make the note about parsing URLs shorter and clearer:

Note that COMMENT tokens cannot occur within other tokens:thus, "url(/*x*/pic.png)" denotes the URI "/*x*/pic.png", not"pic.png".

C.8.389.5Floats

Clarify the note:

Note: this means that floats with zeroouterheight or negativeouter height do not shorten line boxes.

C.8.3911.1.1 Overflow:the 'overflow' property

Shorten the “applies to” line:

'overflow'
Value:  visible | hidden | scroll | auto |inherit
Initial:  visible
Applies to:  non-replaced block-level elements, table cells, inline-table, and inline-block elementsblock containers
Inherited:  no
Percentages:  N/A
Media:  visual
Computed value:  as specified

C.8.409.2.1.1Anonymous block boxes

Clarify how block-level elements inside inline elements areaffected by relative positioning:

When such an inline box is affected by relative positioning,the relative positioningany resultingtranslation also affects the block-level box contained in theinline box.

C.8.4116.2Alignment: the 'text-align' property

Text is justified within the line box, which may be narrower thanthe block box:

In the case of 'justify', this property specifies that theinline-level boxes are to be made flush with both sides of theblock containerline box if possible, […]

C.8.429.5Floats

Only the current and later line boxes can be shortened by afloat. Earlier line boxes, if the float ends up next to them, willoverlap the float instead:

Since a float is not in the flow, non-positioned block boxescreated before and after the float box flow vertically as if the floatdid not exist. However,the current and subsequent lineboxes created next to the float are shortened to make room for themargin box of the float.

C.8.439.4.2Inline formatting contexts

A float may cause a gap between line boxes:

[…] Thus, a paragraph is a vertical stack of lineboxes. Line boxes are stacked with no vertical separation(exceptas specified elsewhere) and they never overlap.

C.8.445.12Pseudo-elements

Added a note to make it explicit that CSS 2.1 does not define':first-line' and ':first-letter' completely:

Note that the sections below do not definethe exact rendering of ':first-line' and ':first-letter' in allcases. A future level of CSS may define them moreprecisely.

C.8.459.5Floats

Clarify that “overlap a float” means overlap themargin box of the float:

The border box of a table, a block-level replaced element, or anelement in the normal flow that establishes a newblock formatting context(such as an element with 'overflow' other than 'visible') must notoverlapthe margin box of any floats in the same blockformatting context as the element itself.

C.8.469.5Floats

A line box next to a float is not shortened if it already doesn'toverlap the float:

[…] However, the current and subsequent line boxes creatednext to the float are shortenedas necessary to make roomfor the margin box of the float.

C.8.4714.2.1Background properties: 'background-color', 'background-image','background-repeat', 'background-attachment', 'background-position',and 'background'

Because of insufficient implementations of background images withan intrinsic ratio but no intrinsic size, add this note:

However, the position is undefined in CSS 2.1 if theimage has an intrinsic ratio, but no intrinsic size.

C.8.489.2.4 The'display' property

Because some aspects of 'run-in' (most notably if and how 'clear'should apply to run-in elements when they are inline) are still underdiscussion, 'run-in' has been reclassified as a level 3feature.

Change in section 9.2.4:

Value:inline | block | list-item|run-in | inline-block | table | inline-table | inline |block | list-item | run-in | inline-block | table | inline-table |table-row-group | table-header-group | table-footer-group | table-row| table-column-group | table-column | table-cell | table-caption |none | inherit

and

run-in
This value creates either block or inline boxes,depending on context. Properties apply to run-in boxes based ontheir final status (inline-level or block-level).

Remove 'run-in' fromsection9.2.1 “Block-level elements and block boxes”:

[…] The following values of the 'display' property make anelement block-level: 'block', 'list-item',and 'run-in' (part ofthe time; see run-in boxes), and 'table'.

Remove 'run-in' fromsection9.2.2 “Inline-level elements and inline boxes”:

[…] The following values of the 'display' property make anelement inline-level: 'inline', 'inline-table',and'inline-block'and 'run-in' (part of the time; see run-inboxes). […]

[…] A non-replaced element with a 'display' value of'inline' generates an inline box.An element with a 'display'value of 'run-in' can also generate an inline box; see run-inboxes.

Replacesection 9.2.3“Run-in boxes” by this:

9.2.3 Run-in boxes

[This section exists so that the section numbers are the same as inprevious drafts. 'Display: run-in' is now defined in CSS level 3(seeCSS basic box model).]

Remove 'run-in' fromsection9.3 “Positioning schemes”:

  1. Normal flow. In CSS 2.1, normal flow includes blockformatting of block-level boxes, inline formatting of inline-levelboxes,and relative positioning of block-level andinline-level boxes, and formatting of run-in boxes.

Remove 'run-in' fromsection9.5.2 “Controlling flow next to floats: the 'clear'property”:

For run-in boxes, this property applies to the final block boxto which the run-in box belongs.

Remove 'run-in' fromsection 9.7“Relationships between 'display', 'position', and'float'”:

Specified valueComputed value
inline-tabletable
inline,run-in, table-row-group, table-column,table-column-group, table-header-group, table-footer-group, table-row,table-cell, table-caption, inline-blockblock
otherssame as specified

Remove 'run-in' fromsection 9.10“Text direction: the 'direction' and 'unicode-bidi'properties”:

The final order of characters in each block container is the sameas if the bidi control codes had been added as described above, markuphad been stripped, and the resulting character sequence had beenpassed to an implementation of the Unicode bidirectional algorithm forplain text that produced the same line-breaks as the styled text. Inthis process, replaced elements with 'display: inline'(andreplaced elements with 'display: run-in', when they generateinline-level boxes) are treated as neutral characters, unlesstheir 'unicode-bidi' property has a value other than 'normal', inwhich case they are treated as strong characters in the 'direction'specified for the element. All other atomic inline-level boxes aretreated as neutral characters always.

Remove 'run-in' fromsection E.1“Definitions”:

Tree Order
Preorder depth-first traversal of the renderingtree, in logical (not visual) order for bidirectional content, aftertaking into account properties that move boxes aroundsuch as the'run-in' value of 'display'.

Remove 'run-in' fromsection12.1 “The :before and :after pseudo-elements”:

The :before and :after pseudo-elements interact with otherboxes, such as run-in boxes, as if they were real elementsinserted just inside their associated element.

and also from the subsequent example.

C.8.496.1.2Computed values

Clarify that the keyword 'inherit' means that the specified valueis the inherited value. The value isnot the keyword itself.

When the specified value is not 'inherit', the computedvalue of a property is determined as specified by the Computed Valueline in the definition of the property. See the section oninheritance for the definition of computedvalues when the specified value is 'inherit'.

And in6.2.1:

Each property may also have aspecifiedcascaded value of 'inherit', which means that, for a givenelement, the property takes the samecomputedspecified value as the property for the element'sparent. The 'inherit' value can be used tostrengtheninheritedenforce inheritance of values, and it canalso be used on properties that are not normally inherited.

C.8.5010.3.2Inline, replaced elements

Because of lack of implementations, the width of a replaced elementwith an intrinsic ratio but neither intrinsic with nor intrinsicheight is left undefined:

If 'height' and 'width' both have computed values of 'auto' and theelement has an intrinsic ratio but no intrinsic height or width,andthen the used value of 'width' isundefined in CSS 2.1. However, it is suggested that, ifthe containing block's width does not itself depend on thereplaced element's width, then the used value of 'width' is calculatedfrom the constraint equation used for block-level, non-replacedelements in normal flow.

C.8.51Section 9.5.2 Controlling flow next to floats: the 'clear'property

Because of lack of implementations, also allow 'clear' to work in adifferent way for now:

Computing the clearance of an element on which 'clear' is set isdone by first determining the hypothetical position of the element'stop border edgewithin its parent block. This position iswhere the actual top border edge would have been if the element had anon-zero bottom border and its 'clear' property had been 'none'.

If this hypothetical position of the element's top border edge isnot past the relevant floats, then clearance is introduced, andmargins collapse according to the rules in 8.3.1.

Then the amount of clearance is set to the greater of:

  1. The amount necessary to place the border edge of the block even with the bottom outer edge of the lowest float that is to be cleared.
  2. The amount necessary to place the top border edge of the block at its hypothetical position.

Alternatively, clearance is set exactly to the amountnecessary to place the border edge of the block even with the bottomouter edge of the lowest float that is to be cleared.

Note: Both behaviors areallowed pending evaluation of their compatibility with existing Webcontent. A future CSS specification will require either one or theother.

C.8.52G.2 Lexicalscanner

The tokenizer in the appendix allowed backslashes in the URI token,in contradiction with the same token in the core grammar and the errorrecovery token {baduri}:

{U}{R}{L}"("{w}{string}{w}")"      {return URI;}{U}{R}{L}"("{w}{url}{w}")"         {return URI;}"url("{w}{string}{w}")"            {return URI;}"url("{w}{url}{w}")"               {return URI;}

C.8.53Section 9.5.2 Controlling flow next to floats: the 'clear'property

The top border edge is now well-defined in the section oncollapsing margins. That is the hypothetical position to use forclearance:

This position is where the actual top border edge would have beenif the elementhad a non-zero bottom border and its's 'clear' property had been 'none'.

C.8.549.5Floats

Remove ambiguities:

If a shortened line box is too small to contain any contentafter the float, thenthat contentthe linebox is shifted downward(and its width recomputed)until eitheritsome content fits or there areno more floats present. Any content in the current line before afloated box is reflowed in thefirst availablesame line on the other side of the float.

C.8.5510.6.3Block-level non-replaced elements in normal flow when 'overflow'computes to 'visible'

Removed redundancy (the top edge was already defined elsewhere) andmade the implied cases for the bottom edge explicit:

If it only has inline-level children, the height is thedistance between the top of the topmost line box and the bottom of thebottommost line box.

If it has block-level children, the height is the distancebetween the top border-edge of the topmost block-level child box thatdoes not have margins collapsed through it and the bottom border-edgeof the bottommost block-level child box that does not have marginscollapsed through it. However, if the element has a non-zero toppadding and/or top border, or is the root element, then the contentstarts at the top margin edge of the topmost child. (The first caseexpresses the fact that the top and bottom margins of the elementcollapse with those of the topmost and bottommost children, while inthe second case the presence of the padding/border prevents the topmargins from collapsing.) Similarly, if the bottom margin of theblock does not collapse with the bottom margin of its last in-flowchild, then the content ends at the bottom margin edge of thebottommost child.

The element's height is the distance from its top content edgeto the first applicable of the following:

  1. the bottom edge of the last line box, if the box establishes a inline formatting context with one or more lines
  2. the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom margin does not collapse with the element's bottom margin
  3. the bottom border edge of the last in-flow child whose top margin doesn't collapse with the element's bottom margin
  4. zero, otherwise

previous  next  contents  properties  index  


[8]ページ先頭

©2009-2025 Movatter.jp