W3CCSS20-970924

CSS2 Specification

W3C Working Draft 24-September-1997

Table of Contents

1 About the CSS2 Specification
Test Number 1
1.1 How to read the specification
1.2 How the specification is organized
1.3 Acknowledgments

2 Introduction to CSS2
Test Number 2
2.1 A brief CSS2 tutorial
Test Number 2.1
2.2 Design principles behind CSS2
Test Number 2.2
2.3 Tips for style sheet authors
Test Number 2.3

3 Definitions and document conventions
Test Number 3
3.1 Definitions
Test Number 3.1
   3.1.1 Object language
Test Number 3.1.1
   3.1.2 Element
Test Number 3.1.2
   3.1.3 Document tree
Test Number 3.1.3
   3.1.4 Inheritance
Test Number 3.1.4
   3.1.5 User agent (or UA)
Test Number 3.1.5
   3.1.6 Conforming user agent
Test Number 3.1.6
   3.1.7 Default style sheet
Test Number 3.1.7
   3.1.8 Canvas
Test Number 3.1.8
3.2 Conventions
Test Number 3.2
   3.2.1 CSS property definitions
Test Number 3.2.1
   3.2.2 HTML conventions
Test Number 3.2.2

4 CSS2 syntax and basic data types
Test Number 4
4.1 Syntax
Test Number 4.1
   4.1.1 Characters and case
Test Number 4.1.1
   4.1.2 Statements
Test Number 4.1.2
   4.1.3 At-rules
Test Number 4.1.3
   4.1.4 Blocks
Test Number 4.1.4
   4.1.5 Rule sets, declaration blocks, and selector-strings
Test Number 4.1.5
   4.1.6 Properties
Test Number 4.1.6
   4.1.7 Comments
Test Number 4.1.7
   4.1.8 Error handling
Test Number 4.1.8
4.2 Basic Data types
Test Number 4.2
   4.2.1 Integers and numbers
Test Number 4.2.1
   4.2.2 Lengths
Test Number 4.2.2
   4.2.3 Percentages
Test Number 4.2.3
   4.2.4 URLs
Test Number 4.2.4
   4.2.5 Colors
Test Number 4.2.5
   4.2.6 Angles
Test Number 4.2.6
   4.2.7 Time
Test Number 4.2.7
   4.2.8 Frequencies
Test Number 4.2.8
4.3 CSS and HTML
Test Number 4.3

5 Selectors
Test Number 5
5.1 Type selectors
Test Number 5.1
5.2 Grouping
Test Number 5.2
5.3 Contextual selectors
Test Number 5.3
5.4 Sequential selectors
Test Number 5.4
5.5 Pseudo-elements and pseudo-classes
Test Number 5.5
   5.5.1 Overlapping pseudo-elements
Test Number 5.5.1
   5.5.2 Pseudo-elements with contextual selectors
Test Number 5.5.2
   5.5.3 Typographical pseudo-elements: :first-line and :first-letter
Test Number 5.5.3
      :first-line
      :first-letter
   5.5.4 Anchor pseudo-classes in HTML:
Test Number 5.5.4 :link, :visited, and :active
5.6 Attribute selectors
Test Number 5.6
   5.6.1 Attribute selectors in HTML
Test Number 5.6.1
   5.6.2 The class attribute
Test Number 5.6.2
   5.6.3 The class attribute in other object languages
Test Number 5.6.3
   5.6.4 The id attribute
Test Number 5.6.4
   5.6.5 Pseudo-elements and pseudo-classes with attribute selectors
Test Number 5.6.5
   5.6.6 Colliding attribute selectors and pseudo-classes
Test Number 5.6.6

6 Cascade
Test Number 6
6.1 Cascading order
Test Number 6.1
   6.1.1 'Important' rules
Test Number 6.1.1
   6.1.2 Cascading order in HTML
Test Number 6.1.2
      Precedence of object language attributes

7 Media types
Test Number 7
7.1 Specifying media-dependent style sheets
Test Number 7.1
7.2 Valid media types
Test Number 7.2

8 Visual flow model
Test Number 8
8.1 The box model
Test Number 8.1
   8.1.1 Box dimensions
Test Number 8.1.1
   8.1.2 Margin properties
Test Number 8.1.2
      Values for <margin-width>
      'margin-top'
      'margin-right'
      'margin-bottom'
      'margin-left'
      'margin'
   8.1.3 Padding properties
Test Number 8.1.3
      Values for <padding-width>
      'padding-top'
      'padding-right'
      'padding-bottom'
      'padding-left'
      'padding'
   8.1.4 Border properties
Test Number 8.1.4
      Values for <border-width>
      'border-top-width'
      'border-right-width'
      'border-bottom-width'
      'border-left-width'
      'border-width'
      'border-color'
      'border-style'
      'border-top'
      'border-bottom'
      'border-right'
      'border-left'
      'border'
   8.1.5 Example of margins, padding, and borders
Test Number 8.1.5
8.2 The flow model
Test Number 8.2
   8.2.1 Block level layout
Test Number 8.2.1
      List-item elements
   8.2.2 Inline layout
Test Number 8.2.2
   8.2.3 Relative positioning
Test Number 8.2.3
   8.2.4 Controlling layout behavior
Test Number 8.2.4
      'display'
8.3 Outside the flow
Test Number 8.3
   8.3.1 Floats
Test Number 8.3.1
      'float'
      'clear'
   8.3.2 Absolute positioning
Test Number 8.3.2
      'left'
      'top'
      'right'
      'bottom'
      'position'
8.4 Comparison of normal, relative, floating, and absolute positioning
Test Number 8.4
8.5 Z-order: Layered presentation
Test Number 8.5
   8.5.1 Calculating the stack level
Test Number 8.5.1
      'z-index'
8.6 Multicolumn layout
Test Number 8.6

9 Visual flow model details
Test Number 9
9.1 Box width calculations
Test Number 9.1
      'width'
   9.1.1 Relationship of width dimensions
Test Number 9.1.1
   9.1.2 Width of floats and replaced elements
Test Number 9.1.2
   9.1.3 Width of absolutely positioned elements
Test Number 9.1.3
   9.1.4 Minimum and maximum widths
Test Number 9.1.4
      'min-width'
      'max-width'
9.2 Box height calculations
Test Number 9.2
      'height'
   9.2.1 Height of replaced elements
Test Number 9.2.1
   9.2.2 Height of absolutely positioned elements
Test Number 9.2.2
   9.2.3 Minimum and maximum heights
Test Number 9.2.3
      'min-height'
      'max-height'
   9.2.4 Collapsing margins
Test Number 9.2.4
9.3 Scaling
Test Number 9.3
      'aspect-ratio'
9.4 Line height calculations
Test Number 9.4
      'line-height'
      'vertical-align'
9.5 Floating constraints
Test Number 9.5
      Float overlap
9.6 Overflow and clipping
Test Number 9.6
   9.6.1 Overflow
Test Number 9.6.1
      'overflow'
   9.6.2 Clipping
Test Number 9.6.2
      'clip'
9.7 Visibility
Test Number 9.7
      'visibility'
9.8 Dynamic positioning
Test Number 9.8
9.9 Filters
Test Number 9.9

10 Colors and Backgrounds
Test Number 10
10.1 Foreground properties
Test Number 10.1
      'color'
10.2 Background properties
Test Number 10.2
      'background-color'
      'background-image'
      'background-repeat'
      'background-attachment'
      'background-position'
      'background'

11 Fonts
Test Number 11
11.1 Font specification
Test Number 11.1
   11.1.1 Font family
Test Number 11.1.1
      'font-family'
   11.1.2 Font style
Test Number 11.1.2
      'font-style'
      'font-variant'
      'font-weight'
   11.1.3 Font size
Test Number 11.1.3
      'font-size'
   11.1.4 The 'font' shorthand property
Test Number 11.1.4
      'font'
11.2 Font selection
Test Number 11.2
   11.2.1 Font Descriptions and @font-face
Test Number 11.2.1
   11.2.2 Font-face Descriptors for Selecting a Font
Test Number 11.2.2
      'font-family'
      'font-style'
      'font-variant'
      'font-weight'
      'font-size'
   11.2.3 Font-face Descriptors for Font Data Qualification
Test Number 11.2.3
      'unicode-range'
   11.2.4 Font-face Descriptors for Numeric Values
Test Number 11.2.4
      'units-per-em'
   11.2.5 Font-face Descriptors for Referencing
Test Number 11.2.5
      'src'
   11.2.6 Font-face Descriptors for Matching
Test Number 11.2.6
      'panose-1'
      'stemv'
      'stemh'
      'slope'
      'cap-height'
      'x-height'
      'ascent'
      'descent'
   11.2.7 Font-face Descriptors for Synthesis
Test Number 11.2.7
      'widths'
      'definition-src'
   11.2.8 Font-face Descriptors for Alignment
Test Number 11.2.8
      'centerline'
      'mathline'
      'topline'
   11.2.9 General Font Descriptors
Test Number 11.2.9
      Adorned font name
      Central Baseline
      Co-ordinate units on the em square
      Font encoding tables
      Font family name
      Glyph Representation widths
      Glyph Representation heights
      Horizontal stem width
      Height of capital glyph representations
      Height of lowercase glyph representations
      Mathematical Baseline
      Maximal bounding box
      Maximum unaccented height
      Maximum unaccented depth
      Panose-1 number
      Range of Unicode characters
      Top Baseline
      Vertical stem width
      Vertical stroke angle
   11.2.10 Fonts for Multiple Media
Test Number 11.2.10
11.3 Font matching algorithm
Test Number 11.3
   11.3.1 Examples of font matching
Test Number 11.3.1

12 Text
Test Number 12
12.1 White space
Test Number 12.1
      'white-space'
12.2 Case
Test Number 12.2
   12.2.1 Capitalization
Test Number 12.2.1
      'text-transform'
   12.2.2 Special first letter/first line
Test Number 12.2.2
12.3 Letter and word spacing
Test Number 12.3
      'letter-spacing'
      'word-spacing'
12.4 Indentation
Test Number 12.4
      'text-indent'
12.5 Alignment
Test Number 12.5
      'alignment'
12.6 Decoration
Test Number 12.6
   12.6.1 Underlining, over lining, striking, and blinking
Test Number 12.6.1
      'text-decoration'
   12.6.2 Text shadows
Test Number 12.6.2
      text-shadow-color'
12.7 Generated text
Test Number 12.7
12.8 Automatic numbering
Test Number 12.8
12.9 Text in HTML
Test Number 12.9
   12.9.1 Forcing a line break
Test Number 12.9.1

13 Lists
Test Number 13
13.1 Visual formatting of lists
Test Number 13.1
   13.1.1 List properties
Test Number 13.1.1
      'list-style-type'
      'list-style-image'
      'list-style-position'
      'list-style'

14 Tables
Test Number 14
14.1 Table layout
Test Number 14.1
      'column-span'
      'row-span'
      'direction'
14.2 Computing widths and heights
Test Number 14.2
14.3 Placement of the borders
Test Number 14.3
14.4 Conflict resolution for borders
Test Number 14.4
14.5 Properties for columns and rows
Test Number 14.5
14.6 Vertical alignment of cells in a row
Test Number 14.6
14.7 Horizontal alignment of cells in a column
Test Number 14.7
14.8 Table captions
Test Number 14.8
      'caption-side'
14.9 Floating elements inside cells
Test Number 14.9
14.10 Generating speech
Test Number 14.10
      'speak-header-cell'
14.11 Table implementation notes
Test Number 14.11

15 User interface
Test Number 15
15.1 Cursors
Test Number 15.1
      'cursor'
15.2 User preferences for colors and fonts
Test Number 15.2
   15.2.1 System Colors
Test Number 15.2.1
   15.2.2 System fonts
Test Number 15.2.2
15.3 Other rendering issues that depend on user agents
Test Number 15.3
   15.3.1 Magnification
Test Number 15.3.1

16 Aural style sheets
Test Number 16
16.1 Aural cascading style sheet properties
Test Number 16.1
   16.1.1 Volume properties
Test Number 16.1.1
      'volume'
   16.1.2 Speaking properties
Test Number 16.1.2
      'speak'
   16.1.3 Pause properties
Test Number 16.1.3
      'pause-after'
      'pause'
   16.1.4 Cue properties
Test Number 16.1.4
      'cue-before'
      'cue-after'
      'cue'
   16.1.5 Mixing properties
Test Number 16.1.5
      'play-during'
   16.1.6 Spatial properties
Test Number 16.1.6
      'azimuth'
      'elevation'
   16.1.7 Voice characteristic properties
Test Number 16.1.7
      'speech-rate'
      'voice-family'
      'pitch'
      'pitch-range'
      'stress'
      'richness'
      'speak-punctuation'
      'speak-date'
      'speak-numeral'
      'speak-time'

17 Printing with style sheets
Test Number 17
17.1 Background to printing
Test Number 17.1
17.2 The page model
Test Number 17.2
17.3 Page breaks
Test Number 17.3
   17.3.1 Page break properties
Test Number 17.3.1
      'page-break-before'
      'page-break-after'
      'orphan'
      'widow'
   17.3.2 Allowed page breaks
Test Number 17.3.2
   17.3.3 Forced page breaks
Test Number 17.3.3
   17.3.4 "Best" page breaks
Test Number 17.3.4
17.4 Page boxes: the @page rule
Test Number 17.4
   17.4.1 @page properties
Test Number 17.4.1
      'size'
      'marks'
17.5 Pseudo-class page boxes
Test Number 17.5
17.6 Cascading in the page context
Test Number 17.6

Appendix A: A sample style sheet for HTML 2.0

Appendix B: Changes from CSS1

Appendix C: Implementation and performance notes
Colors
   Gamma Correction
Fonts
   Glossary of font terms
   Font retrieval
Printing
   Future extensions

Appendix D: The grammar of CSS2
Test Number D

References
Normative references
Informative references

Index