CSS2.1 Test Suite

Syntax and basic data types (326 tests)

Test Flags
4 Syntax and basic data types
Parsing counter functions with just the identifier
  • Counters can be referred to using only the identifier.
Parsing invalid counter functions - Too many arguments
  • A counter is invalid if it has too many arguments.
I
Selector attributes and hyphens
  • Attribute selectors can begin with hyphens.
Attribute selectors and underscores
  • Attribute selectors can begin with underscores.
Attribute selectors with hyphens and underscores
  • Attribute selectors are valid if they begin with hyphens and then underscores.
Attribute selection with digits
  • Attribute selectors cannot begin with digits.
I
Attribute selectors starting with hyphens and digits
  • Attribute selectors cannot begin with hyphens then digits.
I
Attribute selectors starting with underscore and digits
  • Attribute selectors can begin with underscore then digits.
4.1 Syntax
4.1.1 Tokenization
4.1.2 Keywords
Keywords v. Strings (background)
Keywords v. Strings (width)
Parsing single quoted property keywords
  • Rules with property keywords which are surrounded by single quotes are ignored.
I
Parsing double quoted value keywords
  • Rules with value keywords which are surrounded by double quotes are ignored.
I
4.1.2.1 Vendor-specific extensions
4.1.2.2 Informative Historical Notes
4.1.3 Characters and case
Case insensitivity within selectors, properties and values
  • Styles are applied regardless of character case.
Case sensitive html attributes
  • CSS style sheets parts that are not under the control of CSS are case-sensitive.
Case-sensitivity of Properties and Keywords (background)
Case-sensitivity of At-rules (@media)
Parsing escaped identifiers as selectors, property and value
  • Escaped identifiers are parsed and applied.
Parsing escaped special CSS characters
  • Escaped special CSS characters are no longer meaningful.
Parsing escaped newlines within identifiers
  • Newlines cannot be escaped within identifiers.
I
Parsing escaped chars in the range of 0-9a-f
  • The {unicode} chars are not treated like {escape} chars.
I
Parsing escaped characters as selector and property
  • Escaped characters are treated as normal characters.
Parsing escaped identifiers with spaces
  • Escaped identifiers are parsed and spaces between them are ignored.
Termination of escaped character sequences with white space
  • Escaped character sequences are terminated by white space.
Termination of escaped character sequences with six digits
  • Escaped character sequences are terminated by exactly six hex digits.
Termination of escaped character sequences with six digits and white space
  • Escaped character sequences are terminated by exactly six hex digits and white space.
Termination of escaped character sequences with less than 6 digits and white space
  • Escaped character sequences are terminated by white space.
Termination of escaped character sequences with two digits terminated by white space
  • Escaped character sequences (two hex digits) are terminated by white space.
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.
Escaped Newline in String
Escaped Quote Marks in String
Invalid Punctuation Escapes
Class and Keyword Letter Escapes
Unicode Escapes
Unicode Escapes and Case Insensitivity
Incorrect Letter Escape (Class Selector)
Space-terminated Unicode Escapes
Invalid Space-terminated Character Escapes
Characters and case: Escaping a character inside a keyword
  • Browsers should be able to ignore the keyword
I
Unicode-escaped Braces
  • Unicode escapes cannot substitute for '{' or '}' in CSS syntax.
I
Valid Identifiers (a-z) as Classes and IDs
Valid Identifiers (-_a-zA-Z0-9) as Classes and IDs
Valid Identifiers (starting with _) as Classes and IDs
Valid Identifiers (starting with -) as Classes and IDs
Valid Identifiers (starting with ideographic) as Classes and IDs
Valid Identifiers (including ideographic) as Classes and IDs
Valid Identifiers (starting with escape) as Classes and IDs
Valid Identifiers (including escape) as Classes and IDs
Invalid Identifiers (starting with digit) as Classes and IDs I
Valid Identifiers (including digits) as Classes and IDs
Valid Identifiers (starting with escape) as Classes and IDs
Valid Identifiers (including escapes) as Classes and IDs
Valid Identifiers (starting with escaped digits, control codes) as Classes and IDs
Valid Identifiers (starting with escaped -) as Classes and IDs
4.1.4 Statements
4.1.5 At-rules
At-rules
At-rules
At-rules
At-rules
At-rules
At-rules
At-rules
At-rules
At-rules
At-rules
4.1.6 Blocks
Parsing nested blocks and strings in style blocks
  • Blocks and strings are parsed with matching terminating pairs.
I
Empty declaration block
  • Declaration blocks that are empty have no effect on later declarations.
Parsing square bracket blocks
  • Blocks and strings are parsed with matching terminating pairs of square brackets.
I
Parsing curly bracket blocks
  • Blocks and strings are parsed with matching terminating pairs of curly brackets.
I
Parsing parentheses blocks
  • Blocks and strings are parsed with matching terminating pairs of parentheses.
I
Parsing blocks and strings in style blocks
  • Nested blocks and strings are parsed accordingly.
I
4.1.7 Rule sets, declaration blocks, and selectors
Parsing of bad selectors
  • Declarations with bad selectors are ignored.
I
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.
UI
font-family
  • Unquoted font-family names must not contain unescaped parentheses or unescaped curly braces
AI
4.1.8 Declarations and properties
Parsing white space in style declaration
  • Various white space are allowed anywhere within the declaration and are ignored.
Parsing invalid rules that precede good rules
  • Bad rules are ignored while following good rules are applied.
I
Parsing invalid rules that follow good rules
  • Good rules are applied while following bad rules are ignored.
I
Parsing invalid values
  • Invalid values are ignored while valid properties are applied.
I
Parsing invalid values with spaces
  • Invalid values with spaces are ignored while valid properties are applied.
I
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.
I
Parsing invalid values with slashes
  • Invalid values with slashes are ignored while valid properties are applied.
I
Parsing invalid values that are functions
  • Invalid values that are functions are ignored while valid properties are applied.
I
4.1.9 Comments
Basic Containment
Comments
Comments
Parsing comments within style tag
  • Comments are allowed anywhere within a style tag declaration and are ignored.
Nested comments
  • Comments cannot be nested.
I
HTML comments and CSS comments
  • SGML comment delimiters do not delimit CSS comments.
I
Parsing of invalid comments
  • Comments that are invalid are ignored.
I
Parsing of escaped "/" within a valid comment
  • A slash '/' escaped with a backslash will remove its special meaning.
I
Parsing of escaped "*" within a valid comment
  • A star '*' escaped with a backslash will remove its special meaning.
I
Parsing of valid comment that is empty
  • Empty comments do not affect parsing of rule.
I
Parsing of escaped opening comment
  • Escaping a slash '/' for an opening comment makes the comment invalid.
I
Parsing of invalid escaped "*" in open comment
  • Escaping a star '*' for an opening comment makes the comment invalid.
I
SGML comments
  • UAs must ignore SGML comment delimiters between statements.
Parsing SGML comments
  • SGML comment tokens are parsed and ignored.
4.2 Rules for handling parsing errors
Parser error handling with invalid at-rules: @ invalid selector
  • At-Rules start with an at-keyword (@ followed immediately by an identifier).
I
Parsing of invalid @rules
  • An at-rule consists of everything up to and including the next semi-colon or the next block.
I
Parsing of invalid @rules with blocks
  • An at-rule consists of everything up to and including the next semi-colon or the next block.
I
@import inside block
  • @import is ignored if inside a block.
I
@import following @charset
  • @import is ignored if inside a block or after any valid statement except @charset.
I
@import following valid statements
  • @import is ignored if after any valid statement except @charset.
I
@import following an invalid statement
  • @import is ignored if inside a block or after any valid statement except @charset.
I
@import following a bad @rule
  • @import is ignored after invalid @rule.
I
@import after a bad selector and rule block
  • @import is not ignored if after bad selector.
I
@rules and white space
  • White space does not affect the validity of @rules.
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).
I
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).
I
Rule blocks and white space
  • White space around rule blocks do not affect the validity of the rule block.
Forward-Compatible Parsing I
Forward-Compatible Parsing I
Forward-Compatible Parsing I
Forward-Compatible Parsing I
Forward-Compatible Parsing I
Parsing counter() function with no white space
  • The counter function can be parsed with no white space separating the function values.
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.
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.
Parsing counter() function with white space
  • The counter function can be parsed with white space separating the function value.
Parsing counter() function with white space and two function values
  • The counter function can be parsed with white space separating the two function values.
Parsing counters() function with white space and two function values
  • The counters function can be parsed with white space separating the two function values.
Parsing counters() function with white space and three function values
  • The counters function can be parsed with white space separating the three function values.
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 - 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.
UI
malformed declaration missing ':', value, part 1 I
malformed declaration missing ':', value, part 2 I
malformed declaration missing value, part 1 I
malformed declaration missing value, part 2 I
malformed declaration: unexpected tokens { }, part 1 I
malformed declaration: unexpected tokens { }, part 2 I
Parsing unexpected end of declaration block
  • The parser implicitly terminates the block and applies the styles if the declaration block is not terminated.
I
Parsing unexpected end of function
  • User agents close all open parentheses at the end of the style sheet.
I
Parsing unexpected end of string
  • Close all open strings at the end of the style sheet.
I
Parsing unexpected end of @media block
  • User agents close all open blocks at the end of the style sheet.
I
Parsing unexpected end of @import
  • User agents close all open rules at the end of the style sheet.
I
Parsing unexpected end of @import with closed quote
  • User agents close all open quotes at the end of the style sheet.
I
Parsing unexpected end of shorthand rule
  • User agents close all open rules at the end of the style sheet.
I
Parser error handling with invalid at-rules: @ invalid selector invalidates entire block
  • The entire block of an invalid at-rule is ignored.
I
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.
I
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.
I
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.
I
Parsing malformed rules: Property with no value assigned
  • Malformed rules (property with no value) are ignored while valid ones are applied.
I
Parsing malformed rules: No value and no semi-colon
  • Malformed rules with no value or semi-colon are ignored while valid rules are applied.
I
Parsing malformed rules: No value with property
  • Malformed rules with no value are ignored while valid rules are applied.
I
Parsing malformed rules: Semi-colon before property
  • Malformed rules with semi-colon before property are ignored while valid rules are applied.
I
Parsing malformed rules: Valid rule after malformed rule
  • Malformed rules are ignored while valid rules are applied.
I
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.
I
Parsing malformed rules: Missing property
  • Malformed rules with missing property names are ignored while valid rules are applied.
I
Error handling of unterminated strings
  • When the parser encounters an unterminated string, the parser drops everything up to the next ';'.
fontI
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'.
I
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'.
I
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'.
I
4.3 Values
4.3.1 Integers and real numbers
Parsing invalid numbers - alphanumeric characters
  • An integer cannot have alphanumeric characters within it.
I
Parsing decimal values - decimal with multiple decimal digits
  • A number can be zero or more digits followed by a dot (.) followed by multiple digits.
Parsing invalid decimal values - alphanumeric characters within number
  • An alphanumeric character cannot be within the number value.
I
Parsing integer numbers with '+'
  • Integers can be preceded by '+'.
Parsing signed integers
  • Positively signed integers are treated the same as non-signed integers.
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'.
I
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'.
I
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'.
I
z-index - negative values
  • Integers should range from -2,147,483,648 to 2,147,483,647 according to C Language Specification
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 - 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.
AG
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.
AG
text-indent A
padding-top A
padding-left AG
padding AG
Length Units A
Length Units
Length Units AG
Optional unit identifier after 0
  • After a zero length, the unit identifier is not necessary.
Unsupported negative values
  • If a negative length value is set on a property that does not allow negative length values, the declaration is ignored.
I
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.
A
Em size with font-size set to x-large
  • The 'em' unit is equal to the computed value of the 'font-size' property (x-large) of the element on which it is used.
A
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.
A
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.
A
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.
A
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.
A
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.
A
Em size with font-size set to 'larger'
  • The 'em' unit is equal to the computed value of the 'font-size' property, after resolving the value 'larger', of the element on which it is used.
A
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.
AR
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.
First available font defines the 'ex' unit size
  • The 'ex' unit size is defined by the element's first available font.
A
Root element and the 'ex' unit size
  • The 'ex' unit refers to the property's initial value when specified on the root element.
96A
Root element and the 'em' unit size
  • The 'em' unit refers to the property's initial value when specified on the root element.
96A
4.3.3 Percentages
Percentage Units AG
Parsing invalid percentage values - decimal value with multiple decimals
  • Percentage assignments with more than one decimal are invalid.
I
Parsing of percentage values - 0%
  • Percentage of 0% is valid and calculates to 0.
4.3.4 URLs and URIs
Basic Containment
URLs G
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.
Parsing URL with an invalid space
  • URL functions with invalid spaces are ignored.
I
URL with missing closing parenthesis
  • Url functions with missing closing parenthesis are ignored.
GI
URL function with URI that has escaped special chars
  • URI escapes are allowed in URL functions.
G
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.
G
Invalid character (*) after URL function values
  • Special CSS characters following URL strings invalidate the entire url assignment.
GI
Invalid character (&) after URL functions values
  • Invalid characters following URL strings invalidate the entire url assignment.
GI
Invalid characters (alpha) before URL function values
  • Alpha characters preceding URL strings invalidate the entire url assignment.
GI
Invalid character (/) before URL functions
  • A slash character preceding URL string invalidates the entire url assignment.
GI
Invalid character (_) before URL functions
  • An underscore character preceding URL string invalidates the entire url assignment.
GI
Invalid character (=) before URL functions
  • An equal sign character preceding URL string invalidates the entire url assignment.
GI
4.3.5 Counters
content: counter(c)
content: counter(c, none)
content: counter(c, disc)
content: counter(c, circle)
content: counter(c, square)
content: counter(c, decimal)
content: counter(c, decimal-leading-zero)
content: counter(c, lower-roman)
content: counter(c, upper-roman)
content: counter(c, georgian)
content: counter(c, armenian)
content: counter(c, lower-latin)
content: counter(c, lower-alpha)
content: counter(c, upper-latin)
content: counter(c, upper-alpha)
content: counter(c, lower-greek)
content: counter() error cases I
content: counters(c, ".")
content: counters(c, ".", none)
content: counters(c, ".", disc)
content: counters(c, ".", circle)
content: counters(c, ".", square)
content: counters(c, ".", decimal)
content: counters(c, ".", decimal-leading-zero)
content: counters(c, ".", lower-roman)
content: counters(c, ".", upper-roman)
content: counters(c, ".", georgian)
content: counters(c, ".", armenian)
content: counters(c, ".", lower-latin)
content: counters(c, ".", lower-alpha)
content: counters(c, ".", upper-latin)
content: counters(c, ".", upper-alpha)
content: counters(c, ".", lower-greek)
content: counters() string argument
content: counters() string argument
content: counters() error cases I
dynamic changes to 'counter-increment' O
dynamic changes to 'counter-increment' O
dynamic changes to 'counter-increment' O
dynamic changes to 'counter-increment' O
dynamic changes to 'counter-increment' O
dynamic changes to 'counter-increment' O
Counter properties on 'content: none' pseudo-elements
Counter properties on 'display: none' elements
Counter properties on 'visibility: hidden' elements
Multiple resets for same counter
Multiple increments and resets
Order of 'counter-reset', 'counter-increment', and counter use, including pseudo-elements
Order of counters in out-of-flow content
counters on the root element
Counter scope
Counter scope and nesting on elements
Counter scope and nesting on :before
Counter scope and nesting on :after
Counter scope and nesting
Implied counter scopes with no 'counter-increment' or 'counter-reset'
Implied counter scopes by counter use
Implied counter scopes by 'counter-increment'
4.3.6 Colors
Color Units AG
RGB color syntax error handling I
Parsing rgb color values with white space
  • White space is allowed in the color rgb declaration.
Parsing invalid hexadecimal RGB units - white space in hexadecimal values
  • White space is not allowed in a hexadecimal color assignment.
I
Parsing invalid RGB functional notation - two values
  • An RGB value is invalid if it has only two values.
I
Parsing invalid RGB functional notation - Percentages and Numbers
  • An RGB value is invalid if it has both percentages and number assignments.
I
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.
Comparing color keywords and hex values
  • Color matching of keywords and hex values.
4.3.7 Strings
Parsing strings with escaped newlines
  • Strings with escaped newlines are treated as a single whole string.
Parsing of single quotes inside double quotes
  • Single quotes are allowed in strings that are double quoted.
Parsing of double quotes inside single quotes
  • Double quotes are allowed in strings that are single quoted.
Parsing of escaped quotes (single within single)
  • Single quotes cannot occur inside single quotes unless escaped.
Parsing of escaped double quotes
  • Double quotes cannot occur inside double quotes unless escaped.
Newlines in strings
4.3.8 Unsupported Values
4.4 CSS style sheet representation
HTTP Charset over BOM
  • The HTTP charset setting overrides the Byte Order Mark in the stylesheet.
HTTP Charset over @charset
  • The HTTP charset setting overrides the @charset designation in the stylesheet.
HTTP charset over link charset
  • The HTTP charset setting overrides the charset designation in the link tag.
HTTP charset over set referring code page (UTF-8)
  • The HTTP charset setting overrides the referring document's code page.
HTTP charset over set referring code page (windows-1252)
  • The HTTP charset setting overrides the charset designation in the referring document's meta tag.
HTTP charset over referring code page (not set)
  • The HTTP charset setting overrides the charset of referring document.
@charset over link charset attribute
  • The @charset setting in the stylesheet overrides the charset attribute of the link element.
@charset over referring document's code page (set)
  • The @charset setting in the stylesheet overrides the referring document's set code page.
@charset over referring document's code page (unset)
  • The @charset setting in the stylesheet overrides the referring document's unset code page.
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.
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.
Stylesheet encoding via the referring document's encoding (set)
  • The stylesheet's encoding is determined by the set encoding of the referring document.
Stylesheet encoding via the referring document's encoding (user set)
  • The stylesheet's encoding is determined by the user set referring document's encoding.
U
Matching BOM and @charset (utf-8)
  • The encoding is correctly interpreted from the matched BOM and @charset.
Matching BOM and @charset (utf-16 LE)
  • The encoding is correctly interpreted from the matched BOM and @charset.
Matching BOM and @charset (utf-16 BE)
  • The encoding is correctly interpreted from the matched BOM and @charset.
BOM with no @charset (utf-8)
  • The stylesheet is correctly interpreted as utf-8.
BOM with no @charset (utf-16LE)
  • The stylesheet is correctly interpreted as utf-16LE.
BOM with no @charset (utf-16BE)
  • The stylesheet is correctly interpreted as utf-16BE.
@charset specified (windows-1252)
  • The stylesheet is correctly interpreted as windows-1252.
@charset specified (Shift-JIS)
  • The stylesheet is correctly interpreted as Shift-JIS.
@charset specified (ISO-8859-6)
  • The stylesheet is correctly interpreted as ISO-8859-6.
@charset specified (Big5)
  • The stylesheet is correctly interpreted as Big5.
@charset specified (UTF-8)
  • The stylesheet is correctly interpreted as UTF-8.
@charset specified (UTF-16LE)
  • The stylesheet is correctly interpreted as UTF-16LE.
@charset specified (UTF-16BE)
  • The stylesheet is correctly interpreted as UTF-16BE.
Non-matching BOM (windows-1252 with UTF-8 BOM)
  • The stylesheet is thrown out due to the BOM not matching the actual encoding.
Non-matching BOM (UTF-8 with UTF-16LE BOM)
  • The stylesheet is thrown out due to the BOM not matching the actual encoding.
Non-matching BOM (UTF-16LE with UTF-8 BOM)
  • The stylesheet is thrown out due to the BOM not matching the actual encoding.
Non-matching BOM (UTF-32BE with UTF-16LE BOM)
  • The stylesheet is thrown out due to the BOM not matching the actual encoding.
Non-matching @charset (Shift-JIS with 1252 @charset)
  • The selector does not match due to the mismatched @charset.
Non-matching @charset (Big5 with Shift-JIS @charset)
  • The selector does not match due to the mismatched @charset.
Matching BOM and @charset (utf-8)
  • The encoding is correctly interpreted from the matched BOM and @charset.
Non-matching @charset (UTF-16BE with UTF-8 @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
Non-matching @charset (UTF-32LE with UTF-16BE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
@charset does not match BOM (UTF8 encoding and BOM with UTF-16BE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
@charset does not match BOM (UTF-16LE encoding and BOM with UTF-8 @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
@charset does not match BOM (UTF-32BE encoding and BOM with UTF-16BE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
Mismatched endianness in @charset (UTF-16LE encoding and BOM with UTF-16BE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
Mismatched endianness in @charset (UTF-16BE encoding and BOM with UTF-16LE @charset)
  • The stylesheet is thrown out due to the mismatched @charset.
Endianness not specified (UTF-16LE encoding with UTF-16 @charset)
  • The stylesheet is interpreted in the correct encoding.
Endianness not specified (UTF-16BE encoding with UTF-16 @charset)
  • The stylesheet is interpreted in the correct encoding.
@charset preceded by a newline
  • The selector does not match due to the @charset being ignored.
@charset preceded by a space
  • The selector does not match due to the @charset being ignored.
@charset preceded by a declaration
  • The selector does not match due to the @charset being ignored.
@charset preceded by another @charset
  • The selector does not match due to the second @charset being ignored.
@charset immediately followed by a declaration block
  • The declaration block is interpreted and applied correctly.
@charset in uppercase
  • The selector does not match due to the @charset being ignored.
@charset without quotes
  • The selector does not match due to the @charset being ignored.
@charset missing a space
  • The selector does not match due to the @charset being ignored.
@charset escaped numerically
  • The selector does not match due to the @charset being ignored.
@charset escaped char
  • The selector does not match due to the @charset being ignored.
@charset missing semi-colon
  • The selector does not match due to the @charset being ignored.
@charset with bogus name
  • The selector does not match due to the @charset being ignored.
4.4.1 Referring to characters not represented in a character encoding
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.