31.03.2014 Views

Cascading Style Sheets, Level 2 - World Wide Web Consortium

Cascading Style Sheets, Level 2 - World Wide Web Consortium

Cascading Style Sheets, Level 2 - World Wide Web Consortium

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

At the lexical level, CSS style sheets consist of a sequence of tokens. The list<br />

of tokens for CSS2 is as follows. The definitions use Lex-style regular expressions.<br />

Octal codes refer to ISO 10646 ([ISO10646]). As in Lex, in case of multiple<br />

matches, the longest match determines the token.<br />

Token<br />

Definition<br />

IDENT<br />

ATKEYWORD<br />

STRING<br />

HASH<br />

NUMBER<br />

PERCENTAGE<br />

DIMENSION<br />

URI<br />

UNICODE-RANGE<br />

{ident}<br />

@{ident}<br />

{string}<br />

#{name}<br />

{num}<br />

{num}%<br />

{num}{ident}<br />

url\({w}{string}{w}\)<br />

|url\({w}([!#$%&*-~]|{nonascii}|{escape})*{w}\)<br />

U\+[0-9A-F?]{1,6}(-[0-9A-F]{1,6})?<br />

CDO <br />

; ;<br />

{ \{<br />

} \}<br />

( \(<br />

) \)<br />

[ \[<br />

] \]<br />

S<br />

COMMENT<br />

FUNCTION<br />

[ \t\r\n\f]+<br />

\/\*[^*]*\*+([^/][^*]*\*+)*\/<br />

{ident}\(<br />

INCLUDES ~=<br />

DASHMATCH |=<br />

DELIM<br />

any other character not matched by the above rules<br />

The macros in curly braces ({}) above are defined as follows:<br />

36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!