CSS2.1 Test Suite

Syntax and basic data types (445 tests)

Test Refs Flags Info
+ 4 Syntax and basic data types
counters-001 Parsing counter functions with just the identifier
  • Counters can be referred to using only the identifier.
counters-002 Invalid Parsing invalid counter functions - Too many arguments
  • A counter is invalid if it has too many arguments.
ident-014 Selector attributes and hyphens
  • Attribute selectors can begin with hyphens.
ident-015 Attribute selectors and underscores
  • Attribute selectors can begin with underscores.
ident-016 Attribute selectors with hyphens and underscores
  • Attribute selectors are valid if they begin with hyphens and then underscores.
ident-017 Invalid Attribute selection with digits
  • Attribute selectors cannot begin with digits.
ident-018 Invalid Attribute selectors starting with hyphens and digits
  • Attribute selectors cannot begin with hyphens then digits.
ident-019 Attribute selectors starting with underscore and digits
  • Attribute selectors can begin with underscore then digits.
+ 4.1 Syntax
+ 4.1.1 Tokenization
attribute-token-selector-002 [attr~=""]Attribute Selectors with Empty String Values
  • [attr~=''] is valid but matches nothing.
core-syntax-009 Syntactic White Space
  • Only the characters U+0020, U+0009, U+000A, U+000D, and U+000C are considered white space.
list-style-020 'list-style' shorthand and 'none' values
uri-013 = Invalid handling of invalid url() functions
whitespace-001 White space - em-space (U+2003)
  • Em-space is not treated as white space.
whitespace-002 White space - ideographic space (U+3000)
  • Ideographic space is not treated as white space.
+ 4.1.2 Keywords
keywords-000 Keywords v. Strings (background)
keywords-001 Keywords v. Strings (width)
quoted-keywords-001 Invalid Parsing single quoted property keywords
  • Rules with property keywords which are surrounded by single quotes are ignored.
quoted-keywords-002 Invalid Parsing double quoted value keywords
  • Rules with value keywords which are surrounded by double quotes are ignored.
+ 4.1.2.1 Vendor-specific extensions
+ 4.1.2.2 Informative Historical Notes
+ 4.1.3 Characters and case
case-sensitive-000 Case-sensitivity of Properties and Keywords (background)
case-sensitive-001 Case-sensitivity of At-rules (@media)
case-sensitive-003 Case-sensitivity of pseudo-classes and pseudo-elements
  • Pseudo-class and pseudo-element names are ASCII case-insensitive.
case-sensitive-004 Case-sensitivity of :lang() arguments
  • The argument to :lang() is ASCII case-insensitive.
case-sensitive-005 Case-sensitivity of counter names
  • Counter names are case-sensitive.
case-sensitive-007 Case sensitivity with element selectors
  • Element selectors are case-sensitive in XHTML and XML.
case-sensitive-008 Case sensitive attributes
  • CSS style sheets parts that are not under the control of CSS are case dependant on the language being used.
escaped-ident-001 Parsing escaped identifiers as selectors, property and value
  • Escaped identifiers are parsed and applied.
escaped-ident-002 Parsing escaped special CSS characters
  • Escaped special CSS characters are no longer meaningful.
escaped-ident-003 Invalid Parsing escaped newlines within identifiers
  • Newlines cannot be escaped within identifiers.
escaped-ident-004 Parsing escaped chars in the range of 0-9a-f
  • The {unicode} chars are not treated like {escape} chars.
escaped-ident-char-001 Parsing escaped characters as selector and property
  • Escaped characters are treated as normal characters.
escaped-ident-spaces-001 Parsing escaped identifiers with spaces
  • Escaped identifiers are parsed and spaces between them are ignored.
escaped-ident-spaces-002 Termination of escaped character sequences with white space
  • Escaped character sequences are terminated by white space.
escaped-ident-spaces-003 Termination of escaped character sequences with six digits
  • Escaped character sequences are terminated by exactly six hex digits.
escaped-ident-spaces-004 Termination of escaped character sequences with six digits and white space
  • Escaped character sequences are terminated by exactly six hex digits and white space.
escaped-ident-spaces-005 Termination of escaped character sequences with less than 6 digits and white space
  • Escaped character sequences are terminated by white space.
escaped-ident-spaces-006 Termination of escaped character sequences with two digits terminated by white space
  • Escaped character sequences (two hex digits) are terminated by white space.
escaped-ident-spaces-007 Termination of escaped character sequences with less than six digits terminated by linefeeds and tabs
  • Escaped character sequences (less than six hex digits) are terminated by white space, tabs and linefeeds.
escapes-000 Escaped Newline in String
escapes-001 Escaped Quote Marks in String
escapes-002 Invalid Punctuation Escapes
escapes-003 Class and Keyword Letter Escapes
escapes-004 Unicode Escapes
escapes-005 Unicode Escapes and Case Insensitivity
escapes-006 Incorrect Letter Escape (Class Selector)
escapes-007 Space-terminated Unicode Escapes
escapes-008 Invalid Invalid Space-terminated Character Escapes
escapes-009 Invalid Characters and case: Escaping a character inside a keyword
  • Browsers should be able to ignore the keyword
escapes-010 Invalid Unicode-escaped Braces
  • Unicode escapes cannot substitute for '{' or '}' in CSS syntax.
escapes-012 CSS Parsing: Escaped keywords
font-family-valid-characters-001 Ahem Valid characters in font-family values
  • Valid characters in font family names.
ident-000 Valid Identifiers (a-z) as Classes and IDs
ident-001 Valid Identifiers (-_a-zA-Z0-9) as Classes and IDs
ident-002 Valid Identifiers (starting with _) as Classes and IDs
ident-003 Invalid Valid Identifiers (starting with -) as Classes and IDs
ident-004 Valid Identifiers (starting with ideographic) as Classes and IDs
ident-005 Valid Identifiers (including ideographic) as Classes and IDs
ident-006 Valid Identifiers (starting with escape) as Classes and IDs
ident-007 Valid Identifiers (including escape) as Classes and IDs
ident-008 Invalid Invalid Identifiers (starting with digit) as Classes and IDs
ident-009 Valid Identifiers (including digits) as Classes and IDs
ident-010 Valid Identifiers (starting with escape) as Classes and IDs
ident-011 Valid Identifiers (including escapes) as Classes and IDs
ident-012 Valid Identifiers (starting with escaped digits, control codes) as Classes and IDs
ident-013 Valid Identifiers (starting with escaped -) as Classes and IDs
ident-020 Invalid Invalid Identifiers (starting with double -) as Classes and IDs
+ 4.1.4 Statements
+ 4.1.5 At-rules
at-import-009 Invalid @import following a known but invalid @rule
  • @import is respected after known but ignored @rule.
at-import-010 Invalid @import following an invalid selector
  • @import is respected after invalid (ignored) rule set
at-import-011 Invalid @import following garbage
  • @import is parsed as part of invalid ruleset after garbage.
at-keywords-000 At-rules
at-keywords-001 At-rules
at-keywords-002 Invalid At-rules
at-rules-000 Invalid At-rules
at-rules-001 At-rules
at-rules-002 At-rules
at-rules-003 At-rules
at-rules-004 At-rules
import-000 Invalid At-rules
import-001 Invalid At-rules
+ 4.1.6 Blocks
blocks-001 Invalid Parsing nested blocks and strings in style blocks
  • Blocks and strings are parsed with matching terminating pairs.
blocks-002 Empty declaration block
  • Declaration blocks that are empty have no effect on later declarations.
blocks-004 Invalid Parsing square bracket blocks
  • Blocks and strings are parsed with matching terminating pairs of square brackets.
blocks-005 Invalid Parsing curly bracket blocks
  • Blocks and strings are parsed with matching terminating pairs of curly brackets.
blocks-006 Invalid Parsing parentheses blocks
  • Blocks and strings are parsed with matching terminating pairs of parentheses.
blocks-and-strings-001 Invalid Parsing blocks and strings in style blocks
  • Nested blocks and strings are parsed accordingly.
+ 4.1.7 Rule sets, declaration blocks, and selectors
bad-selector-001 Invalid Parsing of bad selectors
  • Declarations with bad selectors are ignored.
cursor-022 InteractInvalid cursor - set to an invalid value
  • The property 'cursor', when set to an invalid value or an illegal value, must be ignored. Then, instead, the cursor to display should be based on the current context.
escapes-011 CSS Parsing: Escaped keywords
escapes-013 Escaping and spaces with classes
escapes-014 Escaping and spaces with declarations
escapes-015 = Invalid Escape of non-printable characters within declarations, applying to property values
  • red is a reserved (color name) keyword while red\9 is not a reserved keyword. red\9 is made of red with an escaped horizontal tab. That is why the parsing of the declaration should fail. Same thing with the other 23 tests (see test escapes-016).
escapes-016 = Invalid Escape of non-printable characters within declarations, applying to property values
  • red is a reserved (color name) keyword while red\9 is not a reserved keyword. red\9 is made of red with an escaped horizontal tab. That is why the parsing of the declaration should fail. Same thing with the other 23 tests (see test escapes-015).
font-family-008 AhemInvalid font-family - unquoted font-family names with parentheses or curly braces
  • Unquoted font-family names must not contain unescaped parentheses or unescaped curly braces
+ 4.1.8 Declarations and properties
declaration-whitespace-001 Parsing white space in style declaration
  • Various white space are allowed anywhere within the declaration and are ignored.
ignored-rules-001 Invalid Parsing invalid rules that precede good rules
  • Bad rules are ignored while following good rules are applied.
ignored-rules-002 Invalid Parsing invalid rules that follow good rules
  • Good rules are applied while following bad rules are ignored.
ignored-rules-003 Invalid Parsing invalid values
  • Invalid values are ignored while valid properties are applied.
ignored-rules-004 Invalid Parsing invalid values with spaces
  • Invalid values with spaces are ignored while valid properties are applied.
ignored-rules-005 Invalid Parsing invalid values that start with a valid value name
  • Invalid values that begin with a valid keyword are ignored while valid properties are applied.
ignored-rules-006 Invalid Parsing invalid values with slashes
  • Invalid values with slashes are ignored while valid properties are applied.
ignored-rules-007 Invalid Parsing invalid values that are functions
  • Invalid values that are functions are ignored while valid properties are applied.
+ 4.1.9 Comments
c11-import-000 = Basic Containment
c17-comments-000 = Comments
c17-comments-001 = Comments
comments-001 Parsing comments within style tag
  • Comments are allowed anywhere within a style tag declaration and are ignored.
comments-002 Invalid Nested comments
  • Comments cannot be nested.
comments-003 Invalid HTML comments and CSS comments
  • SGML comment delimiters do not delimit CSS comments.
comments-004 Invalid Parsing of invalid comments
  • Comments that are invalid are ignored.
comments-005 Parsing of escaped "/" within a valid comment
  • A slash '/' escaped with a backslash will remove its special meaning.
comments-006 Invalid Parsing of escaped "*" within a valid comment
  • A star '*' escaped with a backslash will not remove its special meaning.
comments-007 Invalid Parsing of valid comment that is empty
  • Empty comments do not affect parsing of rule.
comments-008 Invalid Parsing of escaped opening comment
  • Escaping a slash '/' for an opening comment makes the comment invalid.
comments-009 Invalid Parsing of invalid escaped "*" in open comment
  • Escaping a star '*' for an opening comment makes the comment invalid.
sgml-comments-000 SGML comments
  • UAs must ignore SGML comment delimiters between statements.
sgml-comments-001 Parsing SGML comments
  • SGML comment tokens are parsed and ignored.
sgml-comments-002 Parsing of CDO/CDC in stylesheets
+ 4.2 Rules for handling parsing errors
at-rule-001 Invalid Parser error handling with invalid at-rules: @ invalid selector
  • At-Rules start with an at-keyword (@ followed immediately by an identifier).
at-rule-002 Invalid Parsing of invalid @rules
  • An at-rule consists of everything up to and including the next semi-colon or the next block.
at-rule-003 Invalid Parsing of invalid @rules with blocks
  • An at-rule consists of everything up to and including the next semi-colon or the next block.
at-rule-004 Invalid @import inside block
  • @import is ignored if inside a block.
at-rule-005 Invalid @import following @charset
  • @import is ignored if inside a block or after any valid statement except @charset.
at-rule-006 Invalid @import following valid statements
  • @import is ignored if after any valid statement except @charset.
at-rule-007 Invalid @import following an invalid statement
  • @import is ignored if inside a block or after any valid statement except @charset.
at-rule-008 Invalid @import following a bad @rule
  • @import is ignored after invalid @rule.
at-rule-009 Invalid @import after a bad selector and rule block
  • @import is not ignored if after bad selector.
at-rule-010 @rules and white space
  • White space does not affect the validity of @rules.
at-rule-011 Invalid Parser error handling with invalid at-rules: @ invalid selector with a number
  • At-Rules are ignored if they start with an at-keyword (@ followed immediately by an identifier).
at-rule-012 Invalid Parser error handling with invalid at-rules: @ invalid selector with a hyphen
  • At-Rules are ignored it they start with an at-keyword (@ followed immediately by an identifier).
at-rule-013 Invalid Ignoring at-rules inside @media blocks
  • At-rules inside @media blocks are ignored up to up to the end of the block that contains the invalid at-keyword, or up to and including the next semicolon (;) or up to and including the next block ({...}), whichever comes first.
background-image-005 = Invalid Parsing 'background-image'
blocks-003 Rule blocks and white space
  • White space around rule blocks do not affect the validity of the rule block.
c71-fwd-parsing-000 = Invalid Forward-Compatible Parsing
c71-fwd-parsing-001 = Invalid Forward-Compatible Parsing
c71-fwd-parsing-002 = Invalid Forward-Compatible Parsing
c71-fwd-parsing-003 = Invalid Forward-Compatible Parsing
c71-fwd-parsing-004 = Invalid Forward-Compatible Parsing
core-syntax-001 Nested blocks in unexpected places
core-syntax-002 Nested blocks in unexpected places
core-syntax-003 Nested blocks in unexpected places (with no whitespace)
core-syntax-004 Nested blocks in unexpected places (with no whitespace)
core-syntax-006 Parsing invalid '!' declarations
core-syntax-007 Parsing invalid '!' declarations
core-syntax-008 Parsing invalid '!' declarations
counters-003 Parsing counter() function with no white space
  • The counter function can be parsed with no white space separating the function values.
counters-004 Parsing counters() function with no white space and two function values
  • The counters function can be parsed with no white space separating the two function values.
counters-005 Parsing counters() function with no white space and three function values
  • The counters function can be parsed with no white space separating the three function values.
counters-006 Parsing counter() function with white space
  • The counter function can be parsed with white space separating the function value.
counters-007 Parsing counter() function with white space and two function values
  • The counter function can be parsed with white space separating the two function values.
counters-008 Parsing counters() function with white space and two function values
  • The counters function can be parsed with white space separating the two function values.
counters-009 Parsing counters() function with white space and three function values
  • The counters function can be parsed with white space separating the three function values.
counters-010 Parsing counters() functions
  • To refer to a sequence of nested counters of the same name, the notation is 'counters(identifier, string)' or 'counters(identifier, string, list-style-type)'.
cursor-022 InteractInvalid cursor - set to an invalid value
  • The property 'cursor', when set to an invalid value or an illegal value, must be ignored. Then, instead, the cursor to display should be based on the current context.
declaration-001 Invalid malformed declaration missing ':', value, part 1
declaration-002 Invalid malformed declaration missing ':', value, part 2
declaration-003 Invalid malformed declaration missing value, part 1
declaration-004 Invalid malformed declaration missing value, part 2
declaration-005 Invalid malformed declaration: unexpected tokens { }, part 1
declaration-006 Invalid malformed declaration: unexpected tokens { }, part 2
declarations-009 Invalid Ignoring at-rules inside declaration blocks
  • At-rules inside declaration blocks are parsed as malformed declarations.
eof-001 Invalid Parsing unexpected end of declaration block
  • The parser implicitly terminates the block and applies the styles if the declaration block is not terminated.
eof-002 Invalid Parsing unexpected end of function
  • User agents close all open parentheses at the end of the style sheet.
eof-003 Invalid Parsing unexpected end of string
  • Close all open strings at the end of the style sheet.
eof-004 Invalid Parsing unexpected end of @media block
  • User agents close all open blocks at the end of the style sheet.
eof-005 Invalid Parsing unexpected end of @import
  • User agents close all open rules at the end of the style sheet.
eof-006 Invalid Parsing unexpected end of @import with closed quote
  • User agents close all open quotes at the end of the style sheet.
eof-007 Invalid Parsing unexpected end of shorthand rule
  • User agents close all open rules at the end of the style sheet.
font-family-invalid-characters-001 AhemInvalid Invalid characters in font-family values
  • Invalid characters in font family names invalidate entire declaration.
font-family-invalid-characters-002 AhemInvalid Invalid parenthesis and pair matching
  • Invalid characters in font family names.
font-family-invalid-characters-003 AhemInvalid Invalid curly brackets and pair matching
  • Invalid characters in font family names.
font-family-invalid-characters-004 AhemInvalid Invalid square brackets and pair matching
  • Invalid characters in font family names.
font-family-invalid-characters-005 AhemInvalid Invalid quotes and pair matching
  • Invalid characters in font family names.
font-family-invalid-characters-006 AhemInvalid Invalid single quotes and pair matching
  • Invalid characters in font family names.
invalid-at-rule-001 Invalid Parser error handling with invalid at-rules: @ invalid selector invalidates entire block
  • The entire block of an invalid at-rule is ignored.
invalid-decl-at-rule-001 Invalid Parsing invalid declarations in at-rules where valid declaration precedes an invalid rule
  • Invalid declarations at the end of at-rules are ignored while the remaining preceding valid declarations are applied.
invalid-decl-at-rule-002 Invalid Parsing invalid declarations in at-rules where valid declaration follows invalid rule
  • Invalid declarations at the beginning of at-rules are ignored while the remaining following valid declarations are applied.
malformed-decl-001 Invalid Parsing malformed rules: Property with no value and no ending semicolon
  • Malformed rules (property with no value and no ending semicolon) are ignored while valid rules are applied.
malformed-decl-002 Invalid Parsing malformed rules: Property with no value assigned
  • Malformed rules (property with no value) are ignored while valid ones are applied.
malformed-decl-003 Invalid Parsing malformed rules: No value and no semi-colon
  • Malformed rules with no value or semi-colon are ignored while valid rules are applied.
malformed-decl-004 Invalid Parsing malformed rules: No value with property
  • Malformed rules with no value are ignored while valid rules are applied.
malformed-decl-005 Invalid Parsing malformed rules: Semi-colon before property
  • Malformed rules with semi-colon before property are ignored while valid rules are applied.
malformed-decl-006 Invalid Parsing malformed rules: Valid rule after malformed rule
  • Malformed rules are ignored while valid rules are applied.
malformed-decl-007 Invalid Parsing malformed rules: Double colon separating property and value
  • Malformed rules with double colons between property and value are ignored while valid rules are applied.
malformed-decl-008 Invalid Parsing malformed rules: Missing property
  • Malformed rules with missing property names are ignored while valid rules are applied.
matching-brackets-001 Invalid Matching brackets and quotes for @rules
  • User agents must handle unexpected tokens encountered while parsing an at-rule by reading until the end of the statement, while observing the rules for matching pairs of brackets and quotes, and correctly handling escapes.
matching-brackets-002 Invalid Matching brackets and quotes for declarations
  • User agents must handle unexpected tokens encountered while parsing a declaration by reading until the end of the statement, while observing the rules for matching pairs of brackets and quotes, and correctly handling escapes.
matching-brackets-003 Invalid Matching brackets and quotes for selectors
  • User agents must handle unexpected tokens encountered while parsing a declaration by reading until the end of the statement, while observing the rules for matching pairs of brackets and quotes, and correctly handling escapes.
position-006 = Invalid Parsing 'position'
selectors-parsing-001 CSS: Selector Parsing and Invalid Pseudo-Elements
unterminated-string-001 Invalid Error handling of unterminated strings
  • When the parser encounters an unterminated string, the parser drops everything up to the next ';'.
uri-013 = Invalid handling of invalid url() functions
uri-017 BitmapsInvalid Unclosed URI Token at EOF (in declaration)
  • User agents must close open URI constructs and style rules at the end of the style sheet.
uri-018 BitmapsInvalid Unclosed URI Token at EOF (in @import)
  • User agents must close open URI constructs and statements at the end of the style sheet.
z-index-015 = Invalid z-index - integer value
  • Besides 'auto' and 'inherit' keyword values, z-index property can only accept an integer value. An integer consists of one or more digits '0' to '9'.
z-index-016 = Invalid z-index - integer value
  • Besides 'auto' and 'inherit' keyword values, z-index property can only accept an integer value. An integer consists of one or more digits '0' to '9'.
z-index-017 = Invalid z-index - integer value
  • Besides 'auto' and 'inherit' keyword values, z-index property can only accept an integer value. An integer consists of one or more digits '0' to '9'.
+ 4.3 Values
+ 4.3.1 Integers and real numbers
numbers-units-001 Invalid Parsing invalid numbers - alphanumeric characters
  • An integer cannot have alphanumeric characters within it.
numbers-units-002 Parsing decimal values - decimal with multiple decimal digits
  • A number can be zero or more digits followed by a dot (.) followed by multiple digits.
numbers-units-003 Invalid Parsing invalid decimal values - alphanumeric characters within number
  • An alphanumeric character cannot be within the number value.
numbers-units-004 Parsing integer numbers with '+'
  • Integers can be preceded by '+'.
positive-integer-001 Parsing signed integers
  • Positively signed integers are treated the same as non-signed integers.
z-index-015 = Invalid z-index - integer value
  • Besides 'auto' and 'inherit' keyword values, z-index property can only accept an integer value. An integer consists of one or more digits '0' to '9'.
z-index-016 = Invalid z-index - integer value
  • Besides 'auto' and 'inherit' keyword values, z-index property can only accept an integer value. An integer consists of one or more digits '0' to '9'.
z-index-017 = Invalid z-index - integer value
  • Besides 'auto' and 'inherit' keyword values, z-index property can only accept an integer value. An integer consists of one or more digits '0' to '9'.
z-index-018 = 32 z-index - negative values
  • Integers should range from -2,147,483,648 to 2,147,483,647 according to C Language Specification
z-index-019 = 32 z-index - negative values
  • Integers should range from -2,147,483,648 to 2,147,483,647 according to C Language Specification
+ 4.3.2 Lengths
background-position-001 = AhemBitmaps background-position - ex unit
  • ex unit is the 'x-height' of the relevant font. 'em' and 'ex' length values when defining 'font-size' property refer to the computed font size of the parent element.
background-position-002 = AhemBitmaps background-position - ex unit
  • ex unit is the 'x-height' of the relevant font. 'em' and 'ex' length values when defining 'font-size' property refer to the computed font size of the parent element.
border-width-009 = Invalid CSS Parsing: Negative Border Widths
border-width-010 = Invalid CSS Parsing: Negative Border Widths
c547-indent-000 Ahem text-indent
c5506-padn-t-000 = AhemInvalid padding-top
c5509-padn-l-000 = AhemBitmaps padding-left
c5510-padn-000 AhemBitmaps padding
c61-ex-len-000 = Ahem Length Units
c61-rel-len-000 = AhemBitmaps Length Units
font-size-123 = Invalid CSS Parsing: Negative Font-Size
  • If a negative length value is set into a font-size declaration, then such declaration is ignored.
font-size-124 = Ahem inheritance of computed font-size across fonts
  • ex unit is the 'x-height' of the relevant font. 'em' and 'ex' length values when defining 'font-size' property refer to the computed font size of the parent element.
margin-em-inherit-001 = Bitmaps inherit applied on margin set with em
  • The 'em' unit is equal to the computed value of the 'font-size' property of the element on which it is used. When inherit keyword is used, the property takes the same computed value - a length value in this testcase - as the property for the element's parent.
numbers-units-005 Optional unit identifier after 0
  • After a zero length, the unit identifier is not necessary.
numbers-units-006 Invalid Unsupported negative values
  • If a negative length value is set on a property that does not allow negative length values, the declaration is ignored.
numbers-units-007 Ahem Em sizes
  • The 'em' unit is equal to the computed value of the 'font-size' property (default) of the element on which it is used.
numbers-units-009 Ahem Em size with the font-size set to px size
  • The 'em' unit is equal to the computed value of the 'font-size' property (pixels) of the element on which it is used.
numbers-units-010 Ahem Em size with font-size set to inch
  • The 'em' unit is equal to the computed value of the 'font-size' property (inches) of the element on which it is used.
numbers-units-011 Ahem Em size with font-size set to em
  • When 'em' is assigned in the value of the 'font-size' property itself, it uses the font size of the parent element.
numbers-units-012 Ahem Em size with font-size set to ex
  • The 'em' unit is equal to the computed value of the 'font-size' property (ex) of the element on which it is used.
numbers-units-013 Ahem Em size with font-size set to percentage
  • The 'em' unit is equal to the computed value of the 'font-size' property of the element on which it is used.
numbers-units-015 AhemRecommend Height of EX
  • In the cases where it is impossible or impractical to determine the x-height, a value of 0.5em should be used.
numbers-units-018 Ahem Specifying em/ex on the root element
  • Units 'em' and 'ex' refer to the initial value of the property when specified on the root element of a document.
numbers-units-019 Ahem First available font defines the 'ex' unit size
  • The 'ex' unit size is defined by the element's first available font.
numbers-units-021 96Ahem Root element and the 'em' unit size
  • The 'em' unit refers to the property's initial value when specified on the root element.
padding-009 = Invalid CSS Parsing: Negative Padding
padding-em-inherit-001 = Bitmaps inherit applied on padding set with em
  • The 'em' unit is equal to the computed value of the 'font-size' property of the element on which it is used. When inherit keyword is used, the property takes the same computed value - a length value in this testcase - as the property for the element's parent.
position-absolute-percentage-inherit-001 = position absolute - dimensions and position given by offset percentages and inherit
  • Absolutely positioned boxes can be dimensioned and positioned solely by setting offset 'top', 'right', 'bottom' and 'left' property values with percentage unit and then with inherit keyword. 'inherit' on a offset property makes such offset property take the same computed value as the offset property of the nearest positioned ancestor; in the case of a percentage value - like in this testcase - , the computed value is the specified percentage value of such nearest positioned ancestor.
units-001 = Ahem Units: Equivalence
units-002 = Ahem Units: ex
units-003 = Ahem Units: ex
units-004 = Ahem Units: ex
units-005 Units: em (0.87em floats)
units-006 = Ahem Units: px and font-size
units-008 = Ahem Units: px and inherited font-size
units-009 = Ahem Units: px and dependent font-size
+ 4.3.3 Percentages
c62-percent-000 = AhemBitmaps Percentage Units
numbers-units-016 Invalid Parsing invalid percentage values - decimal value with multiple decimals
  • Percentage assignments with more than one decimal are invalid.
numbers-units-017 Parsing of percentage values - 0%
  • Percentage of 0% is valid and calculates to 0.
+ 4.3.4 URLs and URIs
c11-import-000 = Basic Containment
c64-uri-000 = Bitmaps URLs
uri-001 Parsing valid URIs with white space and no quotes
  • A url function is valid if it is 'url(', followed by the URI, followed by ')', even with white space between.
uri-002 Invalid Parsing URL with an invalid space
  • URL functions with invalid spaces are ignored.
uri-003 BitmapsInvalid URL with missing closing parenthesis
  • Url functions with missing closing parenthesis are ignored.
uri-004 Bitmaps URL function with URI that has escaped special chars
  • URI escapes are allowed in URL functions.
uri-005 Bitmaps URL function with escaped special chars - single quote
  • Single quote characters appearing in an unquoted URI need to be escaped with a backslash so that the resulting URI value is a URI token.
uri-006 BitmapsInvalid Invalid character (*) after URL function values
  • Special CSS characters following URL strings invalidate the entire url assignment.
uri-007 BitmapsInvalid Invalid character (&) after URL functions values
  • Invalid characters following URL strings invalidate the entire url assignment.
uri-008 BitmapsInvalid Invalid characters (alpha) before URL function values
  • Alpha characters preceding URL strings invalidate the entire url assignment.
uri-009 BitmapsInvalid Invalid character (/) before URL functions
  • A slash character preceding URL string invalidates the entire url assignment.
uri-010 BitmapsInvalid Invalid character (_) before URL functions
  • An underscore character preceding URL string invalidates the entire url assignment.
uri-011 BitmapsInvalid Invalid character (=) before URL functions
  • An equal sign character preceding URL string invalidates the entire url assignment.
uri-012 Invalid Error handling of broken url() - balancing braces
uri-014 Unquoted commas in url()
  • Unquoted commas inside url() are valid.
uri-015 Escaped url() functional notation
  • url() notation is case-insensitive and can be escaped.
uri-016 Error handling of broken url() with open /*
  • Comments are just regular tokens inside unquoted URLs.
+ 4.3.5 Counters
content-counter-000 content: counter(c)
content-counter-001 content: counter(c, none)
content-counter-002 content: counter(c, disc)
content-counter-003 content: counter(c, circle)
content-counter-004 content: counter(c, square)
content-counter-005 content: counter(c, decimal)
content-counter-006 content: counter(c, decimal-leading-zero)
content-counter-007 content: counter(c, lower-roman)
content-counter-008 content: counter(c, upper-roman)
content-counter-009 content: counter(c, georgian)
content-counter-010 content: counter(c, armenian)
content-counter-011 content: counter(c, lower-latin)
content-counter-012 content: counter(c, lower-alpha)
content-counter-013 content: counter(c, upper-latin)
content-counter-014 content: counter(c, upper-alpha)
content-counter-015 content: counter(c, lower-greek)
content-counter-016 Invalid content: counter() error cases
content-counters-000 content: counters(c, ".")
content-counters-001 content: counters(c, ".", none)
content-counters-002 content: counters(c, ".", disc)
content-counters-003 content: counters(c, ".", circle)
content-counters-004 content: counters(c, ".", square)
content-counters-005 content: counters(c, ".", decimal)
content-counters-006 content: counters(c, ".", decimal-leading-zero)
content-counters-007 content: counters(c, ".", lower-roman)
content-counters-008 content: counters(c, ".", upper-roman)
content-counters-009 content: counters(c, ".", georgian)
content-counters-010 content: counters(c, ".", armenian)
content-counters-011 content: counters(c, ".", lower-latin)
content-counters-012 content: counters(c, ".", lower-alpha)
content-counters-013 content: counters(c, ".", upper-latin)
content-counters-014 content: counters(c, ".", upper-alpha)
content-counters-015 content: counters(c, ".", lower-greek)
content-counters-016 content: counters() string argument
content-counters-017 content: counters() string argument
content-counters-018 Invalid content: counters() error cases
counter-increment-000 DOM/JS dynamic changes to 'counter-increment'
counter-increment-001 DOM/JS dynamic changes to 'counter-increment'
counter-increment-002 DOM/JS dynamic changes to 'counter-increment'
counter-reset-000 DOM/JS dynamic changes to 'counter-increment'
counter-reset-001 DOM/JS dynamic changes to 'counter-increment'
counter-reset-002 DOM/JS dynamic changes to 'counter-increment'
counters-hidden-000 Counter properties on 'content: none' pseudo-elements
counters-hidden-001 Counter properties on 'display: none' elements
counters-hidden-002 Counter properties on 'visibility: hidden' elements
counters-multi-000 Multiple resets for same counter
counters-multi-001 Multiple increments and resets
counters-order-000 Order of 'counter-reset', 'counter-increment', and counter use, including pseudo-elements
counters-order-001 Order of counters in out-of-flow content
counters-root-000 counters on the root element
counters-scope-000 Counter scope
counters-scope-001 Counter scope and nesting on elements
counters-scope-002 Counter scope and nesting on :before
counters-scope-003 Counter scope and nesting on :after
counters-scope-004 Counter scope and nesting
counters-scope-implied-000 Implied counter scopes with no 'counter-increment' or 'counter-reset'
counters-scope-implied-001 Implied counter scopes by counter use
counters-scope-implied-002 Implied counter scopes by 'counter-increment'
+ 4.3.6 Colors
c63-color-000 = AhemBitmaps Color Units
color-000 Invalid RGB color syntax error handling
colors-001 Parsing rgb color values with white space
  • White space is allowed in the color rgb declaration.
colors-002 Invalid Parsing invalid hexadecimal RGB units - white space in hexadecimal values
  • White space is not allowed in a hexadecimal color assignment.
colors-003 Invalid Parsing invalid RGB functional notation - two values
  • An RGB value is invalid if it has only two values.
colors-004 Invalid Parsing invalid RGB functional notation - Percentages and Numbers
  • An RGB value is invalid if it has both percentages and number assignments.
colors-005 Clipping of RGB color values
  • Values outside the device gamut are clipped: the red, green, and blue values are changed to fall within the range supported by the device.
colors-006 Comparing color keywords and hex values
  • Color matching of keywords and hex values.
colors-007 = Invalid Color keyword syntax
+ 4.3.7 Strings
escaped-newline-001 Parsing strings with escaped newlines
  • Strings with escaped newlines are treated as a single whole string.
quoted-string-001 Parsing of single quotes inside double quotes
  • Single quotes are allowed in strings that are double quoted.
quoted-string-002 Parsing of double quotes inside single quotes
  • Double quotes are allowed in strings that are single quoted.
quoted-string-003 Parsing of escaped quotes (single within single)
  • Single quotes cannot occur inside single quotes unless escaped.
quoted-string-004 Parsing of escaped double quotes
  • Double quotes cannot occur inside double quotes unless escaped.
strings-000 Newlines in strings
+ 4.3.8 Unsupported Values
+ 4.4 CSS style sheet representation
at-charset-001 HTTP HTTP Charset over BOM
  • The HTTP charset setting overrides the Byte Order Mark in the stylesheet.
at-charset-002 HTTP HTTP Charset over @charset
  • The HTTP charset setting overrides the @charset designation in the stylesheet.
at-charset-003 HTTP HTTP charset over link charset
  • The HTTP charset setting overrides the charset designation in the link tag.
at-charset-004 HTTP HTTP charset over set referring code page (UTF-8)
  • The HTTP charset setting overrides the referring document's code page.
at-charset-005 HTTP HTTP charset over set referring code page (windows-1252)
  • The HTTP charset setting overrides the charset designation in the referring document's meta tag.
at-charset-006 HTTP HTTP charset over referring code page (not set)
  • The HTTP charset setting overrides the charset of referring document.
at-charset-007 @charset over link charset attribute
  • The @charset setting in the stylesheet overrides the charset attribute of the link element.
at-charset-008 @charset over referring document's code page (set)
  • The @charset setting in the stylesheet overrides the referring document's set code page.
at-charset-009 @charset over referring document's code page (unset)
  • The @charset setting in the stylesheet overrides the referring document's unset code page.
at-charset-010 Link charset attribute over referring document's codepage (set)
  • The stylesheet's encoding is determined by the link element's charset attribute and not the referring document's code page.
at-charset-011 Link charset attribute over referring document's codepage (not set)
  • The stylesheet's encoding is determined by the link element's charset attribute and not the referring document's code page.
at-charset-012 Stylesheet encoding via the referring document's encoding (set)
  • The stylesheet's encoding is determined by the set encoding of the referring document.
at-charset-014 Matching BOM and @charset (utf-8)
  • The encoding is correctly interpreted from the matched BOM and @charset.
at-charset-015 Matching BOM and @charset (utf-16 LE)
  • The encoding is correctly interpreted from the matched BOM and @charset.
at-charset-016 Matching BOM and @charset (utf-16 BE)
  • The encoding is correctly interpreted from the matched BOM and @charset.
at-charset-019 BOM with no @charset (utf-8)
  • The stylesheet is correctly interpreted as utf-8.
at-charset-020 BOM with no @charset (utf-16LE)
  • The stylesheet is correctly interpreted as utf-16LE.
at-charset-021 BOM with no @charset (utf-16BE)
  • The stylesheet is correctly interpreted as utf-16BE.
at-charset-024 @charset specified (windows-1252)
  • The stylesheet is correctly interpreted as windows-1252.
at-charset-025 @charset specified (Shift-JIS)
  • The stylesheet is correctly interpreted as Shift-JIS.
at-charset-026 @charset specified (ISO-8859-6)
  • The stylesheet is correctly interpreted as ISO-8859-6.
at-charset-027 @charset specified (Big5)
  • The stylesheet is correctly interpreted as Big5.
at-charset-028 @charset specified (UTF-8)
  • The stylesheet is correctly interpreted as UTF-8.
at-charset-029 @charset specified (UTF-16LE)
  • The stylesheet is correctly interpreted as UTF-16LE.
at-charset-030 @charset specified (UTF-16BE)
  • The stylesheet is correctly interpreted as UTF-16BE.
at-charset-033 Non-matching BOM (windows-1252 with UTF-8 BOM)
  • The stylesheet is thrown out due to the BOM not matching the actual encoding.
at-charset-034 Non-matching BOM (UTF-8 with UTF-16LE BOM)
  • The stylesheet is thrown out due to the BOM not matching the actual encoding.
at-charset-035 Non-matching BOM (UTF-16LE with UTF-8 BOM)
  • The stylesheet is thrown out due to the BOM not matching the actual encoding.
at-charset-036 Non-matching BOM (UTF-32BE with UTF-16LE BOM)
  • The stylesheet is thrown out due to the BOM not matching the actual encoding.
at-charset-037 Non-matching @charset (Shift-JIS with 1252 @charset)
  • The selector does not match due to the mismatched @charset.
at-charset-038 Non-matching @charset (Big5 with Shift-JIS @charset)
  • The selector does not match due to the mismatched @charset.
at-charset-039 Matching BOM and @charset (utf-8)
  • The encoding is correctly interpreted from the matched BOM and @charset.
at-charset-040 Non-matching @charset (UTF-16BE with UTF-8 @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
at-charset-041 Non-matching @charset (UTF-32LE with UTF-16BE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
at-charset-042 @charset does not match BOM (UTF8 encoding and BOM with UTF-16BE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
at-charset-043 @charset does not match BOM (UTF-16LE encoding and BOM with UTF-8 @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
at-charset-044 @charset does not match BOM (UTF-32BE encoding and BOM with UTF-16BE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
at-charset-045 Mismatched endianness in @charset (UTF-16LE encoding and BOM with UTF-16BE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
at-charset-046 Mismatched endianness in @charset (UTF-16BE encoding and BOM with UTF-16LE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
at-charset-047 Endianness not specified (UTF-16LE encoding with UTF-16 @charset)
  • The stylesheet is interpreted in the correct encoding.
at-charset-048 Endianness not specified (UTF-16BE encoding with UTF-16 @charset)
  • The stylesheet is interpreted in the correct encoding.
at-charset-049 @charset preceded by a newline
  • The selector does not match due to the @charset being ignored.
at-charset-050 @charset preceded by a space
  • The selector does not match due to the @charset being ignored.
at-charset-051 @charset preceded by a declaration
  • The selector does not match due to the @charset being ignored.
at-charset-052 @charset preceded by another @charset
  • The selector does not match due to the second @charset being ignored.
at-charset-053 @charset immediately followed by a declaration block
  • The declaration block is interpreted and applied correctly.
at-charset-054 @charset in uppercase
  • The selector does not match due to the @charset being ignored.
at-charset-055 @charset without quotes
  • The selector does not match due to the @charset being ignored.
at-charset-056 @charset missing a space
  • The selector does not match due to the @charset being ignored.
at-charset-057 @charset escaped numerically
  • The selector does not match due to the @charset being ignored.
at-charset-058 @charset escaped char
  • The selector does not match due to the @charset being ignored.
at-charset-059 @charset missing semi-colon
  • The selector does not match due to the @charset being ignored.
at-charset-060 @charset with bogus name
  • The selector does not match due to the @charset being ignored.
at-charset-061 @charset within style block
  • The selector does not match due to the @charset being ignored.
at-charset-071 HTTP Stylesheet encodings: ISO-8859-1
at-charset-072 HTTP Stylesheet encodings: ISO-8859-11
at-charset-073 HTTP Stylesheet encodings: ISO-8859-5
at-charset-074 HTTP Stylesheet encodings: ISO-8859-6
at-charset-075 HTTP Stylesheet encodings: ISO-8859-7
at-charset-076 HTTP Stylesheet encodings: ISO-8859-8
at-charset-077 HTTP Stylesheet encodings: KOI8-R
at-charset-quotes-001 = @charset quotes
at-charset-space-001 = @charset leading-space
at-charset-space-002 = @charset trailing-space
at-charset-utf16-be-001 = @charset utf-16-be-no-bom
at-charset-utf16-be-002 = @charset utf-16-be-bom
at-charset-utf16-be-003 = @charset utf-16-bom-be
at-charset-utf16-le-001 = @charset utf-16-le-no-bom
at-charset-utf16-le-002 = @charset utf-16-le-bom
at-charset-utf16-le-003 = @charset utf-16-bom-le
character-encoding-001 HTTP html utf8, css http iso1
  • The user agent respects the encoding of a css stylesheet declared in HTTP.
character-encoding-002 HTTP html utf8, css http iso15
  • The user agent respects the encoding of a css stylesheet declared in HTTP.
character-encoding-003 HTTP html iso1, css http utf8
  • The user agent respects the encoding of a css stylesheet declared in HTTP.
character-encoding-004 HTTP html utf8, css @charset iso1
  • The user agent respects the encoding of a css stylesheet declared in an @charset rule.
character-encoding-005 HTTP html utf8, css @charset iso15
  • The user agent respects the encoding of a css stylesheet declared in an @charset rule.
character-encoding-006 HTTP html iso1, css @charset utf8
  • The user agent respects the encoding of a css stylesheet declared in an @charset rule.
character-encoding-007 HTTP html utf8, link charset iso1
  • The user agent respects the encoding of a css stylesheet declared in a charset attribute on the HTML link.
character-encoding-008 HTTP html utf8, link charset iso15
  • The user agent respects the encoding of a css stylesheet declared in a charset attribute on the HTML link.
character-encoding-009 HTTP html iso-8859-1, link charset utf8
  • The user agent respects the encoding of a css stylesheet declared in a charset attribute on the HTML link.
character-encoding-010 HTTP html iso1
  • The user agent applies the encoding of the HTML file to a css stylesheet whose encoding is not otherwise declared.
character-encoding-011 HTTP html iso15
  • The user agent applies the encoding of the HTML file to a css stylesheet whose encoding is not otherwise declared.
character-encoding-012 HTTP html utf8
  • The user agent applies the encoding of the HTML file to a css stylesheet whose encoding is not otherwise declared.
character-encoding-013 HTTP html iso-8859-1, css bom
  • The user agent uses a UTF-8 signature without an @charset at the beginning of a css stylesheet to indicate that the encoding is UTF-8.
character-encoding-014 HTTP html iso-8859-15, css bom
  • The user agent uses a UTF-8 signature without an @charset at the beginning of a css stylesheet to indicate that the encoding is UTF-8.
character-encoding-015 HTTP html iso-8859-1, css bom and @charset utf8 (in lowercase)
  • When a stylesheet has a BOM and an @charset declaration that is for the right Unicode encoding, the stylesheet works.
character-encoding-016 HTTP html iso-8859-1, css bom and @charset utf8 (in uppercase)
  • When a stylesheet has a BOM and an @charset declaration that is for the right Unicode encoding, the stylesheet works.
character-encoding-017 HTTP html iso-8859-15, css bom and @charset iso15
  • When a stylesheet has a BOM and a @charset declaration that is not for a Unicode encoding, the stylesheet fails.
character-encoding-018 HTTP html utf-8, css @charset unknown
  • When a stylesheet has a @charset declaration with an unknown value, the stylesheet should be ignored.
character-encoding-019 HTTP no semicolon at end of charset rule
  • If a @charset declaration is missing a final semicolon, the encoding declaration will not be recognised.
character-encoding-020 HTTP extra spaces after @charset
  • If a @charset declaration has more than one space after 'charset', the encoding declaration will not be recognised.
character-encoding-021 HTTP extra spaces before colon in charset rule
  • If a @charset declaration has spaces just before the colon, the encoding declaration will not be recognised.
character-encoding-022 HTTP linebreak in middle of charset rule
  • If a @charset declaration has a line break in the middle, the encoding declaration will not be recognised.
character-encoding-023 HTTP single quotes around charset name
  • If a @charset declaration value has single, rather than double, quotes around it, the encoding declaration will not be recognised.
character-encoding-024 HTTP blank line before @charset
  • If a @charset declaration is not on the first line of the file, the encoding declaration will not be recognised.
character-encoding-025 HTTP blank spaces before @charset
  • If a @charset declaration does not start at the beginning of the first line of the file (when there is no BOM), the encoding declaration will not be recognised.
character-encoding-026 HTTP http vs. @charset
  • An HTTP encoding declaration for a stylesheet takes precedence over an @charset declaration.
character-encoding-027 HTTP http vs. charset link
  • An HTTP encoding declaration for a stylesheet takes precedence over a charset attribute link declaration.
character-encoding-028 HTTP http vs. bom
  • An HTTP encoding declaration for a stylesheet takes precedence over a UTF-8 signature.
character-encoding-029 HTTP @charset vs. link charset
  • An HTTP encoding declaration for a stylesheet takes precedence over a UTF-8 signature.
character-encoding-031 HTTP Stylesheet encodings: ISO-8859-1
character-encoding-032 HTTP Stylesheet encodings: ISO-8859-11
character-encoding-033 HTTP Stylesheet encodings: ISO-8859-5
character-encoding-034 HTTP Stylesheet encodings: ISO-8859-6
character-encoding-035 HTTP Stylesheet encodings: ISO-8859-7
character-encoding-036 HTTP Stylesheet encodings: ISO-8859-8
character-encoding-037 HTTP Stylesheet encodings: KOI8-R
character-encoding-038 HTTP Stylesheet encodings: malformed UTF-8
charset-attr-001 = @charset test-attribute
first-letter-nested-006 = :first-letter
+ 4.4.1 Referring to characters not represented in a character encoding
character-representation-001 Character representation in other encoding
  • Characters in the stylesheet that cannot be represented in the current character encoding are written as escaped references to ISO 10646 characters.